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

Unified Diff: webkit/glue/webframe_impl.cc

Issue 147124: Add notifications for when V8Proxy creates or destroys a V8 Context. (Closed)
Patch Set: roll deps Created 11 years, 6 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 | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframe_impl.cc
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 3e418e788bdc6cfe10d2830b5020e85b0837ba29..9bc3e5601a42876bf4b551f0b02f30178c3f63bf 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -824,6 +824,17 @@ NPObject* WebFrameImpl::GetWindowNPObject() {
return frame_->script()->windowScriptNPObject();
}
+#if USE(V8)
+ // Returns the V8 context for this frame, or an empty handle if there is
+ // none.
+v8::Local<v8::Context> WebFrameImpl::GetScriptContext() {
+ if (!frame_)
+ return v8::Local<v8::Context>();
+
+ return frame_->script()->proxy()->GetContext();
+}
+#endif
+
void WebFrameImpl::InvalidateArea(AreaToInvalidate area) {
ASSERT(frame() && frame()->view());
#if defined(OS_WIN) || defined(OS_LINUX)
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698