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

Unified Diff: chrome/renderer/extensions/webstore_bindings.cc

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
Index: chrome/renderer/extensions/webstore_bindings.cc
diff --git a/chrome/renderer/extensions/webstore_bindings.cc b/chrome/renderer/extensions/webstore_bindings.cc
index 275c04e9bbf42669d02472fc1045b32ee1becf44..f7ad060daa19f6d96690792d041dd2f74fdf77ab 100644
--- a/chrome/renderer/extensions/webstore_bindings.cc
+++ b/chrome/renderer/extensions/webstore_bindings.cc
@@ -55,7 +55,7 @@ int g_next_install_id = 0;
WebstoreBindings::WebstoreBindings(Dispatcher* dispatcher,
ChromeV8Context* context)
- : ChromeV8Extension(dispatcher, context->v8_context()),
+ : ChromeV8Extension(dispatcher, context),
ChromeV8ExtensionHandler(context) {
RouteFunction("Install",
base::Bind(&WebstoreBindings::Install, base::Unretained(this)));
@@ -212,13 +212,14 @@ void WebstoreBindings::OnInlineWebstoreInstallResponse(
bool success,
const std::string& error) {
v8::HandleScope handle_scope;
- v8::Context::Scope context_scope(context_->v8_context());
+ v8::Context::Scope context_scope(
+ ChromeV8ExtensionHandler::context_->v8_context());
not at google - send to devlin 2013/05/29 15:55:13 likewise can this call context() instead of access
marja 2013/05/29 16:56:33 Done.
v8::Handle<v8::Value> argv[3];
argv[0] = v8::Integer::New(install_id);
argv[1] = v8::Boolean::New(success);
argv[2] = v8::String::New(error.c_str());
- context_->CallChromeHiddenMethod("webstore.onInstallResponse",
- arraysize(argv), argv, NULL);
+ ChromeV8ExtensionHandler::context_->CallChromeHiddenMethod(
+ "webstore.onInstallResponse", arraysize(argv), argv, NULL);
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698