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

Unified Diff: extensions/renderer/api_binding_types.h

Issue 2598123002: [Extensions Bindings] Add support for updateArgumentsPreValidate (Closed)
Patch Set: rebase Created 3 years, 11 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 | « extensions/renderer/api_binding_test_util.cc ('k') | extensions/renderer/api_binding_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_binding_types.h
diff --git a/extensions/renderer/api_binding_types.h b/extensions/renderer/api_binding_types.h
index c9edc46941601bfb7af86bcee9c3dc3123978b4b..9665ab157628e336dee2858bee72ad0cfdee9796 100644
--- a/extensions/renderer/api_binding_types.h
+++ b/extensions/renderer/api_binding_types.h
@@ -21,6 +21,19 @@ using RunJSFunction = base::Callback<void(v8::Local<v8::Function>,
int argc,
v8::Local<v8::Value>[])>;
+// A callback to execute the given v8::Function synchronously and return the
+// result. Note that script can be suspended, so you need to be certain that
+// it is not before expected a synchronous result. We use a Global instead of a
+// Local because certain implementations need to create a persistent handle in
+// order to prevent immediate destruction of the locals.
+// TODO(devlin): if we could, using Local here with an EscapableHandleScope
+// would be preferable.
+using RunJSFunctionSync =
+ base::Callback<v8::Global<v8::Value>(v8::Local<v8::Function>,
+ v8::Local<v8::Context>,
+ int argc,
+ v8::Local<v8::Value>[])>;
+
} // namespace binding
} // namespace extensions
« no previous file with comments | « extensions/renderer/api_binding_test_util.cc ('k') | extensions/renderer/api_binding_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698