Web Inspector: [JSC] support JS execution in the context of an isolated world
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2012 08:19:51 +0000 (08:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jul 2012 08:19:51 +0000 (08:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85709

Patch by Peter Wang <peter.wang@torchmobile.com.cn> on 2012-07-05
Reviewed by Gavin Barraclough.

No new test case for this bug.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::collectIsolatedContexts):
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121891 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptController.cpp

index 5207d4e..fca6248 100644 (file)
@@ -1,3 +1,16 @@
+2012-07-05  Peter Wang  <peter.wang@torchmobile.com.cn>
+
+        Web Inspector: [JSC] support JS execution in the context of an isolated world
+        https://bugs.webkit.org/show_bug.cgi?id=85709
+
+        Reviewed by Gavin Barraclough.
+
+        No new test case for this bug. 
+
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::collectIsolatedContexts):
+        (WebCore):
+
 2012-07-04  Huang Dongsung  <luxtella@company100.net>
 
         Add virtual keyword to ~BitmapImage and ~StillImage because ~Image is virtual.
index 50a8ac5..06c7996 100644 (file)
@@ -336,10 +336,15 @@ void ScriptController::setCaptureCallStackForUncaughtExceptions(bool)
 {
 }
 
-void ScriptController::collectIsolatedContexts(Vector<std::pair<JSC::ExecState*, SecurityOrigin*> >&)
+void ScriptController::collectIsolatedContexts(Vector<std::pair<JSC::ExecState*, SecurityOrigin*> >& result)
 {
-    // FIXME(85709): support isolated contexts inspection for JSC.
+    for (ShellMap::iterator iter = m_windowShells.begin(); iter != m_windowShells.end(); ++iter) {
+        JSC::ExecState* exec = iter->second->window()->globalExec();
+        SecurityOrigin* origin = iter->second->window()->impl()->securityOrigin();
+        result.append(std::pair<ScriptState*, SecurityOrigin*>(exec, origin));
+    }
 }
+
 #endif
 
 #if ENABLE(NETSCAPE_PLUGIN_API)