Title: [173683] trunk/Source
Revision
173683
Author
commit-qu...@webkit.org
Date
2014-09-16 17:49:20 -0700 (Tue, 16 Sep 2014)

Log Message

Web Inspector: Reduce a bit of churn setting initial remote inspection state
https://bugs.webkit.org/show_bug.cgi?id=136875

Patch by Joseph Pecoraro <pecor...@apple.com> on 2014-09-16
Reviewed by Timothy Hatcher.

Source/_javascript_Core:

* API/JSContextRef.cpp:
(JSGlobalContextCreateInGroup):
Set the defaultl remote debuggable state at the API boundary.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
Do not set remote debuggable state here. Let clients set it.

Source/WebCore:

* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::finishCreation):
We no longer need to toggle this state.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/JSContextRef.cpp (173682 => 173683)


--- trunk/Source/_javascript_Core/API/JSContextRef.cpp	2014-09-17 00:48:01 UTC (rev 173682)
+++ trunk/Source/_javascript_Core/API/JSContextRef.cpp	2014-09-17 00:49:20 UTC (rev 173683)
@@ -138,6 +138,9 @@
 
     if (!globalObjectClass) {
         JSGlobalObject* globalObject = JSGlobalObject::create(*vm, JSGlobalObject::createStructure(*vm, jsNull()));
+#if ENABLE(REMOTE_INSPECTOR)
+        globalObject->setRemoteDebuggingEnabled(true);
+#endif
         return JSGlobalContextRetain(toGlobalRef(globalObject->globalExec()));
     }
 
@@ -147,6 +150,9 @@
     if (!prototype)
         prototype = jsNull();
     globalObject->resetPrototype(*vm, prototype);
+#if ENABLE(REMOTE_INSPECTOR)
+    globalObject->setRemoteDebuggingEnabled(true);
+#endif
     return JSGlobalContextRetain(toGlobalRef(exec));
 }
 

Modified: trunk/Source/_javascript_Core/ChangeLog (173682 => 173683)


--- trunk/Source/_javascript_Core/ChangeLog	2014-09-17 00:48:01 UTC (rev 173682)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-09-17 00:49:20 UTC (rev 173683)
@@ -1,3 +1,18 @@
+2014-09-16  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Reduce a bit of churn setting initial remote inspection state
+        https://bugs.webkit.org/show_bug.cgi?id=136875
+
+        Reviewed by Timothy Hatcher.
+
+        * API/JSContextRef.cpp:
+        (JSGlobalContextCreateInGroup):
+        Set the defaultl remote debuggable state at the API boundary.
+
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+        Do not set remote debuggable state here. Let clients set it.
+
 2014-09-16  Yusuke Suzuki  <utatane....@gmail.com>
 
         Promise: Drop Promise.cast

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (173682 => 173683)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2014-09-17 00:48:01 UTC (rev 173682)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2014-09-17 00:49:20 UTC (rev 173683)
@@ -211,7 +211,6 @@
     m_inspectorController = std::make_unique<Inspector::JSGlobalObjectInspectorController>(*this);
     m_inspectorDebuggable = std::make_unique<JSGlobalObjectDebuggable>(*this);
     m_inspectorDebuggable->init();
-    m_inspectorDebuggable->setRemoteDebuggingAllowed(true);
     m_consoleClient = m_inspectorController->consoleClient();
 #endif
 

Modified: trunk/Source/WebCore/ChangeLog (173682 => 173683)


--- trunk/Source/WebCore/ChangeLog	2014-09-17 00:48:01 UTC (rev 173682)
+++ trunk/Source/WebCore/ChangeLog	2014-09-17 00:49:20 UTC (rev 173683)
@@ -1,3 +1,14 @@
+2014-09-16  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Reduce a bit of churn setting initial remote inspection state
+        https://bugs.webkit.org/show_bug.cgi?id=136875
+
+        Reviewed by Timothy Hatcher.
+
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::JSDOMGlobalObject::finishCreation):
+        We no longer need to toggle this state.
+
 2014-09-16  Enrica Casucci  <enr...@apple.com>
 
         Should have an editing behavior specific for IOS.

Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp (173682 => 173683)


--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp	2014-09-17 00:48:01 UTC (rev 173682)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp	2014-09-17 00:49:20 UTC (rev 173683)
@@ -57,20 +57,12 @@
 {
     Base::finishCreation(vm);
     ASSERT(inherits(info()));
-
-#if ENABLE(REMOTE_INSPECTOR)
-    setRemoteDebuggingEnabled(false);
-#endif
 }
 
 void JSDOMGlobalObject::finishCreation(VM& vm, JSObject* thisValue)
 {
     Base::finishCreation(vm, thisValue);
     ASSERT(inherits(info()));
-
-#if ENABLE(REMOTE_INSPECTOR)
-    setRemoteDebuggingEnabled(false);
-#endif
 }
 
 ScriptExecutionContext* JSDOMGlobalObject::scriptExecutionContext() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to