[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

yurys at chromium.org yurys at chromium.org
Thu Oct 29 20:48:46 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 8ddc80bd19c3738b566ec9440dd3011168f92417
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 20 15:06:32 2009 +0000

    =fix for 30559
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49856 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 51073a8..3b1896f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-20  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Set debug id for contexts of isolated worlds to distinguish them in debugger.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30559
+
+        * bindings/v8/V8Proxy.cpp:
+        (WebCore::V8Proxy::evaluateInIsolatedWorld):
+        (WebCore::V8Proxy::evaluateInNewContext):
+        (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+        * bindings/v8/V8Proxy.h:
+
 2009-10-20  Andras Becsi  <becsi.andras at stud.u-szeged.hu>
 
         Unreviewed buildfix.
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index 19539e2..53f6e5b 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -281,6 +281,9 @@ void V8Proxy::evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode
         } else {
             world = new V8IsolatedWorld(this, extensionGroup);
             m_isolatedWorlds.set(worldID, world);
+
+            // Setup context id for JS debugger.
+            setInjectedScriptContextDebugId(world->context());
         }
     } else {
         world = new V8IsolatedWorld(this, extensionGroup);
@@ -312,14 +315,7 @@ void V8Proxy::evaluateInNewContext(const Vector<ScriptSourceCode>& sources, int
     v8::Context::Scope contextScope(context);
 
     // Setup context id for JS debugger.
-    v8::Handle<v8::Object> contextData = v8::Object::New();
-    v8::Handle<v8::Value> windowContextData = windowContext->GetData();
-    if (windowContextData->IsObject()) {
-        v8::Handle<v8::String> propertyName = v8::String::New(kContextDebugDataValue);
-        contextData->Set(propertyName, v8::Object::Cast(*windowContextData)->Get(propertyName));
-    }
-    contextData->Set(v8::String::New(kContextDebugDataType), v8::String::New("injected"));
-    context->SetData(contextData);
+    setInjectedScriptContextDebugId(context);
 
     v8::Handle<v8::Object> global = context->Global();
 
@@ -345,6 +341,21 @@ void V8Proxy::evaluateInNewContext(const Vector<ScriptSourceCode>& sources, int
     context.Dispose();
 }
 
+void V8Proxy::setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext)
+{
+    // Setup context id for JS debugger.
+    v8::Context::Scope contextScope(targetContext);
+    v8::Handle<v8::Object> contextData = v8::Object::New();
+
+    v8::Handle<v8::Value> windowContextData = context()->GetData();
+    if (windowContextData->IsObject()) {
+        v8::Handle<v8::String> propertyName = v8::String::New(kContextDebugDataValue);
+        contextData->Set(propertyName, v8::Object::Cast(*windowContextData)->Get(propertyName));
+    }
+    contextData->Set(v8::String::New(kContextDebugDataType), v8::String::New("injected"));
+    targetContext->SetData(contextData);
+}
+
 v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* node)
 {
     ASSERT(v8::Context::InContext());
diff --git a/WebCore/bindings/v8/V8Proxy.h b/WebCore/bindings/v8/V8Proxy.h
index e864ba4..e52c58d 100644
--- a/WebCore/bindings/v8/V8Proxy.h
+++ b/WebCore/bindings/v8/V8Proxy.h
@@ -362,6 +362,8 @@ namespace WebCore {
         
         void resetIsolatedWorlds();
 
+        void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext);
+
         static bool canAccessPrivate(DOMWindow*);
 
         static const char* rangeExceptionName(int exceptionCode);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list