summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 07:57:39 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 07:57:39 +0000
commitf13f6dcd035ded3dcdaed4e831760bdf25e1d772 (patch)
tree5e3a122cb9fb9ae4b1c16a6980064187833b114b
parent64d210fe007c50ac20cfe8962c64a1b5cb85c69c (diff)
downloadchromium_src-f13f6dcd035ded3dcdaed4e831760bdf25e1d772.zip
chromium_src-f13f6dcd035ded3dcdaed4e831760bdf25e1d772.tar.gz
chromium_src-f13f6dcd035ded3dcdaed4e831760bdf25e1d772.tar.bz2
Remove dependencies on the bug-bait V8Proxy::context() API. No behavior change.
Review URL: http://codereview.chromium.org/159628 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22045 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/renderer/extensions/event_bindings.cc4
-rw-r--r--webkit/glue/devtools/debugger_agent_impl.cc6
-rw-r--r--webkit/glue/webframe.h2
-rw-r--r--webkit/glue/webframe_impl.cc4
-rw-r--r--webkit/glue/webframe_impl.h2
5 files changed, 9 insertions, 9 deletions
diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc
index 81924cb..a5c69e4 100644
--- a/chrome/renderer/extensions/event_bindings.cc
+++ b/chrome/renderer/extensions/event_bindings.cc
@@ -188,7 +188,7 @@ void EventBindings::HandleContextCreated(WebFrame* frame, bool content_script) {
v8::HandleScope handle_scope;
ContextList& contexts = GetContexts();
- v8::Local<v8::Context> frame_context = frame->GetScriptContext();
+ v8::Local<v8::Context> frame_context = frame->GetMainWorldScriptContext();
v8::Local<v8::Context> context = v8::Context::GetCurrent();
DCHECK(!context.IsEmpty());
DCHECK(bindings_utils::FindContext(context) == contexts.end());
@@ -245,7 +245,7 @@ void EventBindings::HandleContextDestroyed(WebFrame* frame) {
return;
v8::HandleScope handle_scope;
- v8::Local<v8::Context> context = frame->GetScriptContext();
+ v8::Local<v8::Context> context = frame->GetMainWorldScriptContext();
DCHECK(!context.IsEmpty());
ContextList::iterator context_iter = bindings_utils::FindContext(context);
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc
index 6802d3c..d07cc4e 100644
--- a/webkit/glue/devtools/debugger_agent_impl.cc
+++ b/webkit/glue/devtools/debugger_agent_impl.cc
@@ -61,9 +61,9 @@ void DebuggerAgentImpl::GetContextId() {
void DebuggerAgentImpl::StartProfiling() {
v8::HandleScope scope;
- WebCore::V8Proxy* proxy = V8Proxy::retrieve(GetPage()->mainFrame());
- DCHECK(proxy && proxy->isContextInitialized());
- v8::Context::Scope context_scope(proxy->context());
+ WebCore::Frame* frame = GetPage()->mainFrame();
+ DCHECK(V8Proxy::retrieve(GetPage()->mainFrame())->isContextInitialized());
+ v8::Context::Scope context_scope(V8Proxy::context(frame));
v8::V8::ResumeProfiler();
}
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h
index 4fdede8..ddfcb17 100644
--- a/webkit/glue/webframe.h
+++ b/webkit/glue/webframe.h
@@ -83,7 +83,7 @@ class WebFrame {
#if WEBKIT_USING_V8
// Returns the V8 context for this frame, or an empty handle if there is
// none.
- virtual v8::Local<v8::Context> GetScriptContext() = 0;
+ virtual v8::Local<v8::Context> GetMainWorldScriptContext() = 0;
#endif
// Reload the current document.
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index ccd08f4..d59582a 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -785,11 +785,11 @@ NPObject* WebFrameImpl::GetWindowNPObject() {
#if USE(V8)
// Returns the V8 context for this frame, or an empty handle if there is
// none.
-v8::Local<v8::Context> WebFrameImpl::GetScriptContext() {
+v8::Local<v8::Context> WebFrameImpl::GetMainWorldScriptContext() {
if (!frame_)
return v8::Local<v8::Context>();
- return frame_->script()->proxy()->context();
+ return WebCore::V8Proxy::mainWorldContext(frame_);
}
#endif
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h
index ad3d150..de6ba9b 100644
--- a/webkit/glue/webframe_impl.h
+++ b/webkit/glue/webframe_impl.h
@@ -137,7 +137,7 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> {
#if USE(V8)
// Returns the V8 context for this frame, or an empty handle if there is
// none.
- virtual v8::Local<v8::Context> GetScriptContext();
+ virtual v8::Local<v8::Context> GetMainWorldScriptContext();
#endif
virtual void GetContentAsPlainText(int max_chars, std::wstring* text) const;