Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6533)

Unified Diff: chrome/renderer/resources/extensions/file_entry_binding_util.js

Issue 2794043002: [Extensions Bindings] Move safeCallbackApply to exception handler (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/file_system_custom_bindings.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/file_entry_binding_util.js
diff --git a/chrome/renderer/resources/extensions/file_entry_binding_util.js b/chrome/renderer/resources/extensions/file_entry_binding_util.js
index 01ae7de1bf47ef176a7354274648ea04580a6b90..ddb1828cfb7cf921d56af913675dddadc9a9573e 100644
--- a/chrome/renderer/resources/extensions/file_entry_binding_util.js
+++ b/chrome/renderer/resources/extensions/file_entry_binding_util.js
@@ -4,11 +4,11 @@
var fileSystemNatives = requireNative('file_system_natives');
var GetIsolatedFileSystem = fileSystemNatives.GetIsolatedFileSystem;
-var sendRequest = require('sendRequest');
var lastError = require('lastError');
var GetModuleSystem = requireNative('v8_context').GetModuleSystem;
// TODO(sammc): Don't require extension. See http://crbug.com/235689.
var GetExtensionViews = requireNative('runtime').GetExtensionViews;
+var safeCallbackApply = require('uncaught_exception_handler').safeCallbackApply;
// For a given |apiName|, generates object with two elements that are used
// in file system relayed APIs:
@@ -72,11 +72,10 @@ function getFileBindingsForApi(apiName) {
// the callback will not be called with any entries.
if (entries.length == response.entries.length) {
if (response.multiple) {
- sendRequest.safeCallbackApply(
- apiName + '.' + functionName, request, callback,
- [entries]);
+ safeCallbackApply(apiName + '.' + functionName, request,
+ callback, [entries]);
} else {
- sendRequest.safeCallbackApply(
+ safeCallbackApply(
apiName + '.' + functionName, request, callback,
[entries[0]]);
}
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/file_system_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698