diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 16:39:12 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-04 16:39:12 +0000 |
commit | 9a5984409f05752318c259fc1c69f0dba0107c07 (patch) | |
tree | 510d4649e82ef4d108036f81f0634837108308ff /chrome/renderer/extensions/chrome_v8_extension.cc | |
parent | 4fc83f0a16d0c9853603a1c28859e892033e7caa (diff) | |
download | chromium_src-9a5984409f05752318c259fc1c69f0dba0107c07.zip chromium_src-9a5984409f05752318c259fc1c69f0dba0107c07.tar.gz chromium_src-9a5984409f05752318c259fc1c69f0dba0107c07.tar.bz2 |
Extensions: pass ChromeV8Context around instead of v8::Handle.
There was a TODO about this in object_backed_native_handler.h.
The passed handle was a Persistent behind the scenes, and we're going to disable
copying Persistents. We'd need to pass a Local handle instead, but this way the
TODO gets done with a similar amount of effort.
BUG=236290
Review URL: https://chromiumcodereview.appspot.com/16032015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203978 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/chrome_v8_extension.cc')
-rw-r--r-- | chrome/renderer/extensions/chrome_v8_extension.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/chrome/renderer/extensions/chrome_v8_extension.cc b/chrome/renderer/extensions/chrome_v8_extension.cc index 2a3e7d6d..018addc 100644 --- a/chrome/renderer/extensions/chrome_v8_extension.cc +++ b/chrome/renderer/extensions/chrome_v8_extension.cc @@ -26,7 +26,7 @@ using WebKit::WebView; namespace extensions { ChromeV8Extension::ChromeV8Extension(Dispatcher* dispatcher, - v8::Handle<v8::Context> context) + ChromeV8Context* context) : ObjectBackedNativeHandler(context), dispatcher_(dispatcher) { CHECK(dispatcher); @@ -35,18 +35,12 @@ ChromeV8Extension::ChromeV8Extension(Dispatcher* dispatcher, ChromeV8Extension::~ChromeV8Extension() { } -ChromeV8Context* ChromeV8Extension::GetContext() { - return dispatcher_->v8_context_set().GetByV8Context(v8_context()); -} - content::RenderView* ChromeV8Extension::GetRenderView() { - ChromeV8Context* context = GetContext(); - return context ? context->GetRenderView() : NULL; + return context() ? context()->GetRenderView() : NULL; } const Extension* ChromeV8Extension::GetExtensionForRenderView() { - ChromeV8Context* context = GetContext(); - return context ? context->extension() : NULL; + return context() ? context()->extension() : NULL; } } // namespace extensions |