Title: [140273] trunk/Source/WebCore
Revision
140273
Author
[email protected]
Date
2013-01-20 10:18:14 -0800 (Sun, 20 Jan 2013)

Log Message

Web Inspector: Make V8 LiveEdit API disabled by default
https://bugs.webkit.org/show_bug.cgi?id=106668

Patch by Peter Rybin <[email protected]> on 2013-01-20
Reviewed by Yury Semikhatsky.

Initialize method is patched accordingly.

* bindings/v8/_javascript_CallFrame.cpp:
(WebCore::_javascript_CallFrame::restart): missing enable/disable calls added for restart
* bindings/v8/V8Initializer.cpp:
(WebCore::initializeV8Common): initializer method patched

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140272 => 140273)


--- trunk/Source/WebCore/ChangeLog	2013-01-20 11:36:20 UTC (rev 140272)
+++ trunk/Source/WebCore/ChangeLog	2013-01-20 18:18:14 UTC (rev 140273)
@@ -1,3 +1,17 @@
+2013-01-20  Peter Rybin  <[email protected]>
+
+        Web Inspector: Make V8 LiveEdit API disabled by default
+        https://bugs.webkit.org/show_bug.cgi?id=106668
+
+        Reviewed by Yury Semikhatsky.
+
+        Initialize method is patched accordingly.
+
+        * bindings/v8/_javascript_CallFrame.cpp:
+        (WebCore::_javascript_CallFrame::restart): missing enable/disable calls added for restart
+        * bindings/v8/V8Initializer.cpp:
+        (WebCore::initializeV8Common): initializer method patched
+
 2013-01-20  Christophe Dumez  <[email protected]>
 
         [gstreamer]  assertion in g_object_unref from _WebKitWebAudioSourcePrivate destructor

Modified: trunk/Source/WebCore/bindings/v8/_javascript_CallFrame.cpp (140272 => 140273)


--- trunk/Source/WebCore/bindings/v8/_javascript_CallFrame.cpp	2013-01-20 11:36:20 UTC (rev 140272)
+++ trunk/Source/WebCore/bindings/v8/_javascript_CallFrame.cpp	2013-01-20 18:18:14 UTC (rev 140273)
@@ -128,7 +128,10 @@
 v8::Handle<v8::Value> _javascript_CallFrame::restart()
 {
     v8::Handle<v8::Function> restartFunction = v8::Handle<v8::Function>::Cast(m_callFrame.get()->Get(v8::String::NewSymbol("restart")));
-    return restartFunction->Call(m_callFrame.get(), 0, 0);
+    v8::Debug::SetLiveEditEnabled(true);
+    v8::Handle<v8::Value> result = restartFunction->Call(m_callFrame.get(), 0, 0);
+    v8::Debug::SetLiveEditEnabled(false);
+    return result;
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/v8/V8Initializer.cpp (140272 => 140273)


--- trunk/Source/WebCore/bindings/v8/V8Initializer.cpp	2013-01-20 11:36:20 UTC (rev 140272)
+++ trunk/Source/WebCore/bindings/v8/V8Initializer.cpp	2013-01-20 18:18:14 UTC (rev 140273)
@@ -40,6 +40,7 @@
 #include "V8History.h"
 #include "V8Location.h"
 #include "V8PerContextData.h"
+#include <v8-debug.h>
 #include <wtf/RefPtr.h>
 #include <wtf/text/WTFString.h>
 
@@ -108,6 +109,8 @@
     v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
     v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
     v8::V8::IgnoreOutOfMemoryException();
+
+    v8::Debug::SetLiveEditEnabled(false);
 }
 
 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to