Title: [101797] trunk/Source/WebCore
Revision
101797
Author
[email protected]
Date
2011-12-02 07:51:38 -0800 (Fri, 02 Dec 2011)

Log Message

Unreviewed, rolling out r101794.
http://trac.webkit.org/changeset/101794
https://bugs.webkit.org/show_bug.cgi?id=73656

Broke win build (Requested by vsevik on #webkit).

Patch by Sheriff Bot <[email protected]> on 2011-12-02

* bindings/js/ScriptCallStackFactory.cpp:
* bindings/js/ScriptCallStackFactory.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::customArgsAndExceptionCallback):
* bindings/v8/ScriptCallStackFactory.cpp:
* bindings/v8/ScriptCallStackFactory.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/WorkerInspectorController.h:
* page/Console.cpp:
(WebCore::Console::shouldCaptureFullStackTrace):
* page/Console.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (101796 => 101797)


--- trunk/Source/WebCore/ChangeLog	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/ChangeLog	2011-12-02 15:51:38 UTC (rev 101797)
@@ -1,3 +1,30 @@
+2011-12-02  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r101794.
+        http://trac.webkit.org/changeset/101794
+        https://bugs.webkit.org/show_bug.cgi?id=73656
+
+        Broke win build (Requested by vsevik on #webkit).
+
+        * bindings/js/ScriptCallStackFactory.cpp:
+        * bindings/js/ScriptCallStackFactory.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateParametersCheck):
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateFunctionCallback):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
+        * bindings/scripts/test/V8/V8TestObj.cpp:
+        (WebCore::TestObjInternal::customArgsAndExceptionCallback):
+        * bindings/v8/ScriptCallStackFactory.cpp:
+        * bindings/v8/ScriptCallStackFactory.h:
+        * inspector/InspectorInstrumentation.cpp:
+        * inspector/InspectorInstrumentation.h:
+        * inspector/WorkerInspectorController.h:
+        * page/Console.cpp:
+        (WebCore::Console::shouldCaptureFullStackTrace):
+        * page/Console.h:
+
 2011-12-02  Raphael Kubo da Costa  <[email protected]>
 
         Unreviewed, revert r101347.

Modified: trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp (101796 => 101797)


--- trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.cpp	2011-12-02 15:51:38 UTC (rev 101797)
@@ -31,7 +31,6 @@
 #include "config.h"
 #include "ScriptCallStackFactory.h"
 
-#include "InspectorInstrumentation.h"
 #include "JSDOMBinding.h"
 #include "ScriptArguments.h"
 #include "ScriptCallFrame.h"
@@ -49,8 +48,6 @@
 
 namespace WebCore {
 
-class ScriptExecutionContext;
-
 PassRefPtr<ScriptCallStack> createScriptCallStack(size_t, bool)
 {
     return 0;
@@ -86,17 +83,6 @@
     return ScriptCallStack::create(frames);
 }
 
-PassRefPtr<ScriptCallStack> createScriptCallStack(JSC::ExecState* exec)
-{
-    size_t maxStackSize = 1;
-    if (InspectorInstrumentation::hasFrontends()) {
-        ScriptExecutionContext* scriptExecutionContext = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
-        if (InspectorInstrumentation::hasFrontendForScriptContext(scriptExecutionContext))
-            maxStackSize = ScriptCallStack::maxCallStackSizeToCapture;
-    }
-    return createScriptCallStack(exec, maxStackSize);
-}
-
 PassRefPtr<ScriptArguments> createScriptArguments(JSC::ExecState* exec, unsigned skipArgumentCount)
 {
     Vector<ScriptValue> arguments;

Modified: trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.h (101796 => 101797)


--- trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.h	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/js/ScriptCallStackFactory.h	2011-12-02 15:51:38 UTC (rev 101797)
@@ -44,7 +44,6 @@
 
 PassRefPtr<ScriptCallStack> createScriptCallStack(size_t maxStackSize, bool emptyStackIsAllowed);
 PassRefPtr<ScriptCallStack> createScriptCallStack(JSC::ExecState*, size_t maxStackSize);
-PassRefPtr<ScriptCallStack> createScriptCallStack(JSC::ExecState*);
 PassRefPtr<ScriptArguments> createScriptArguments(JSC::ExecState*, unsigned skipArgumentCount);
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (101796 => 101797)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-12-02 15:51:38 UTC (rev 101797)
@@ -2396,7 +2396,8 @@
 
     if ($function->signature->extendedAttributes->{"CustomArgumentHandling"} and !$function->isStatic) {
         push(@$outputArray, "    RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, $numParameters));\n");
-        push(@$outputArray, "    RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec));\n");
+        push(@$outputArray, "    size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;\n");
+        push(@$outputArray, "    RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));\n");
         $implIncludes{"ScriptArguments.h"} = 1;
         $implIncludes{"ScriptCallStack.h"} = 1;
         $implIncludes{"ScriptCallStackFactory.h"} = 1;

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (101796 => 101797)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2011-12-02 15:51:38 UTC (rev 101797)
@@ -1389,7 +1389,8 @@
     if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) {
         push(@implContentDecls, <<END);
     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, $numParameters));
-    RefPtr<ScriptCallStack> callStack(createScriptCallStack());
+    size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
+    RefPtr<ScriptCallStack> callStack(createScriptCallStack(maxStackSize));
     if (!callStack)
         return v8::Undefined();
 END

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (101796 => 101797)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2011-12-02 15:51:38 UTC (rev 101797)
@@ -1287,7 +1287,8 @@
         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
     ExceptionCode ec = 0;
     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 1));
-    RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec));
+    size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
+    RefPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));
     log* intArg(tolog(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (101796 => 101797)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2011-12-02 15:51:38 UTC (rev 101797)
@@ -858,7 +858,8 @@
     ExceptionCode ec = 0;
     {
     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 1));
-    RefPtr<ScriptCallStack> callStack(createScriptCallStack());
+    size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
+    RefPtr<ScriptCallStack> callStack(createScriptCallStack(maxStackSize));
     if (!callStack)
         return v8::Undefined();
     EXCEPTION_BLOCK(log*, intArg, V8log::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8log::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);

Modified: trunk/Source/WebCore/bindings/v8/ScriptCallStackFactory.cpp (101796 => 101797)


--- trunk/Source/WebCore/bindings/v8/ScriptCallStackFactory.cpp	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/v8/ScriptCallStackFactory.cpp	2011-12-02 15:51:38 UTC (rev 101797)
@@ -31,7 +31,6 @@
 #include "config.h"
 #include "ScriptCallStackFactory.h"
 
-#include "InspectorInstrumentation.h"
 #include "InspectorValues.h"
 #include "ScriptArguments.h"
 #include "ScriptCallFrame.h"
@@ -39,14 +38,11 @@
 #include "ScriptScope.h"
 #include "ScriptValue.h"
 #include "V8Binding.h"
-#include "V8Utilities.h"
 
 #include <v8-debug.h>
 
 namespace WebCore {
 
-class ScriptExecutionContext;
-
 static ScriptCallFrame toScriptCallFrame(v8::Handle<v8::StackFrame> frame)
 {
     String sourceName;
@@ -105,17 +101,6 @@
     return createScriptCallStack(stackTrace, maxStackSize, emptyStackIsAllowed);
 }
 
-PassRefPtr<ScriptCallStack> createScriptCallStack()
-{
-    size_t maxStackSize = 1;
-    if (InspectorInstrumentation::hasFrontends()) {
-        ScriptExecutionContext* scriptExecutionContext = getScriptExecutionContext();
-        if (InspectorInstrumentation::hasFrontendForScriptContext(scriptExecutionContext))
-            maxStackSize = ScriptCallStack::maxCallStackSizeToCapture;
-    }
-    return createScriptCallStack(maxStackSize);
-}
-
 PassRefPtr<ScriptArguments> createScriptArguments(const v8::Arguments& v8arguments, unsigned skipArgumentCount)
 {
     v8::HandleScope scope;

Modified: trunk/Source/WebCore/bindings/v8/ScriptCallStackFactory.h (101796 => 101797)


--- trunk/Source/WebCore/bindings/v8/ScriptCallStackFactory.h	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/bindings/v8/ScriptCallStackFactory.h	2011-12-02 15:51:38 UTC (rev 101797)
@@ -48,7 +48,6 @@
 
 PassRefPtr<ScriptCallStack> createScriptCallStack(v8::Handle<v8::StackTrace>, size_t maxStackSize);
 PassRefPtr<ScriptCallStack> createScriptCallStack(size_t maxStackSize, bool emptyStackIsAllowed = false);
-PassRefPtr<ScriptCallStack> createScriptCallStack();
 PassRefPtr<ScriptArguments> createScriptArguments(const v8::Arguments& v8arguments, unsigned skipArgumentCount);
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (101796 => 101797)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp	2011-12-02 15:51:38 UTC (rev 101797)
@@ -44,8 +44,6 @@
 #include "InspectorDOMDebuggerAgent.h"
 #include "InspectorCSSAgent.h"
 #include "InspectorConsoleAgent.h"
-#include "InspectorController.h"
-#include "WorkerInspectorController.h"
 #include "InspectorDatabaseAgent.h"
 #include "InspectorDOMAgent.h"
 #include "InspectorDOMStorageAgent.h"
@@ -877,26 +875,6 @@
     return false;
 }
 
-bool InspectorInstrumentation::hasFrontendForScriptContext(ScriptExecutionContext* scriptExecutionContext)
-{
-    if (!scriptExecutionContext)
-        return false;
-
-    if (scriptExecutionContext->isDocument()) {
-        Document* document = static_cast<Document*>(scriptExecutionContext);
-        Page* page = document->page();
-        return page && page->inspectorController()->hasFrontend();
-#if ENABLE(WORKERS)
-    } else {
-        WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext);
-        WorkerInspectorController* workerInspectorController = workerContext->workerInspectorController();
-        return workerInspectorController && workerInspectorController->hasFrontend();
-#endif
-    }
-
-    return false;
-}
-
 void InspectorInstrumentation::pauseOnNativeEventIfNeeded(InstrumentingAgents* instrumentingAgents, const String& categoryType, const String& eventName, bool synchronous)
 {
 #if ENABLE(_javascript__DEBUGGER)

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (101796 => 101797)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2011-12-02 15:51:38 UTC (rev 101797)
@@ -205,11 +205,9 @@
     static void frontendCreated() { s_frontendCounter += 1; }
     static void frontendDeleted() { s_frontendCounter -= 1; }
     static bool hasFrontends() { return s_frontendCounter; }
-    static bool hasFrontendForScriptContext(ScriptExecutionContext*);
     static bool collectingHTMLParseErrors(Page*);
 #else
     static bool hasFrontends() { return false; }
-    static bool hasFrontendForScriptContext(ScriptExecutionContext*) { return false; }
     static bool collectingHTMLParseErrors(Page*) { return false; }
 #endif
 

Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.h (101796 => 101797)


--- trunk/Source/WebCore/inspector/WorkerInspectorController.h	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.h	2011-12-02 15:51:38 UTC (rev 101797)
@@ -64,7 +64,6 @@
     WorkerInspectorController(WorkerContext*);
     ~WorkerInspectorController();
 
-    bool hasFrontend() const { return m_frontend; }
     void connectFrontend();
     void disconnectFrontend();
     void restoreInspectorStateFromCookie(const String& inspectorCookie);

Modified: trunk/Source/WebCore/page/Console.cpp (101796 => 101797)


--- trunk/Source/WebCore/page/Console.cpp	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/page/Console.cpp	2011-12-02 15:51:38 UTC (rev 101797)
@@ -343,6 +343,19 @@
     InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, EndGroupMessageType, LogMessageLevel, String(), 0, String());
 }
 
+bool Console::shouldCaptureFullStackTrace() const
+{
+#if ENABLE(INSPECTOR)
+    Page* page = this->page();
+    if (!page)
+        return false;
+
+    return page->inspectorController()->hasFrontend();
+#else
+    return false;
+#endif
+}
+
 void Console::warn(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack)
 {
     addMessage(LogMessageType, WarningMessageLevel, arguments, callStack);

Modified: trunk/Source/WebCore/page/Console.h (101796 => 101797)


--- trunk/Source/WebCore/page/Console.h	2011-12-02 15:32:05 UTC (rev 101796)
+++ trunk/Source/WebCore/page/Console.h	2011-12-02 15:51:38 UTC (rev 101797)
@@ -82,6 +82,8 @@
     void groupCollapsed(PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>);
     void groupEnd();
 
+    bool shouldCaptureFullStackTrace() const;
+
     static bool shouldPrintExceptions();
     static void setShouldPrintExceptions(bool);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to