Don't use Node's internal APIs

This commit is contained in:
Cheng Zhao 2015-09-07 16:12:31 +08:00
parent 24bbe5dabf
commit 46b2b91a27
8 changed files with 25 additions and 21 deletions

View file

@ -717,17 +717,19 @@ void WebContents::PrintToPDF(const base::DictionaryValue& setting,
PrintToPDF(setting, callback);
}
void WebContents::AddWorkSpace(const base::FilePath& path) {
void WebContents::AddWorkSpace(mate::Arguments* args,
const base::FilePath& path) {
if (path.empty()) {
node::ThrowError(isolate(), "path cannot be empty");
args->ThrowError("path cannot be empty");
return;
}
DevToolsAddFileSystem(path);
}
void WebContents::RemoveWorkSpace(const base::FilePath& path) {
void WebContents::RemoveWorkSpace(mate::Arguments* args,
const base::FilePath& path) {
if (path.empty()) {
node::ThrowError(isolate(), "path cannot be empty");
args->ThrowError("path cannot be empty");
return;
}
DevToolsRemoveFileSystem(path);