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

Unified Diff: extensions/renderer/script_context.cc

Issue 1136953017: Add fallback mechanism to release Extension ports if the JS context has been destroyed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years, 7 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/script_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index f384f0cb6dc7d0a89891734accef04fafef3035f..ac87f7098f8fb3f03c2f59e845877f895e74246e 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -176,7 +176,7 @@ content::RenderFrame* ScriptContext::GetRenderFrame() const {
}
v8::Local<v8::Value> ScriptContext::CallFunction(
- v8::Local<v8::Function> function,
+ const v8::Local<v8::Function>& function,
int argc,
v8::Local<v8::Value> argv[]) const {
v8::EscapableHandleScope handle_scope(isolate());
@@ -196,6 +196,11 @@ v8::Local<v8::Value> ScriptContext::CallFunction(
function, global, argc, argv)));
}
+v8::Local<v8::Value> ScriptContext::CallFunction(
+ const v8::Local<v8::Function>& function) const {
+ return CallFunction(function, 0, nullptr);
+}
+
Feature::Availability ScriptContext::GetAvailability(
const std::string& api_name) {
// Hack: Hosted apps should have the availability of messaging APIs based on
« no previous file with comments | « extensions/renderer/script_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698