[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

yurys at chromium.org yurys at chromium.org
Sun Feb 20 23:25:12 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 96e9b6ade76214a93db8928a79c069bc7db40637
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 20 12:31:18 2011 +0000

    2010-12-14  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Adam Barth.
    
            [V8] Get rid of delayed exception reporting in V8ConsoleMessage.cpp
            https://bugs.webkit.org/show_bug.cgi?id=51044
    
            * WebCore.gypi:
            * bindings/v8/V8ConsoleMessage.cpp: Removed.
            * bindings/v8/V8ConsoleMessage.h: Removed.
            * bindings/v8/V8DOMWindowShell.cpp:
            (WebCore::v8UncaughtExceptionHandler):
            (WebCore::reportUnsafeJavaScriptAccess):
            (WebCore::V8DOMWindowShell::initContextIfNeeded):
            * bindings/v8/V8Proxy.cpp:
            (WebCore::addMessageToConsole):
            (WebCore::logInfo):
            (WebCore::V8Proxy::reportUnsafeAccessTo):
            (WebCore::V8Proxy::runScript):
            (WebCore::V8Proxy::callFunction):
            (WebCore::V8Proxy::newInstance):
            * bindings/v8/V8Proxy.h:
            * bindings/v8/WorkerContextExecutionProxy.cpp:
            * bindings/v8/specialization/V8BindingState.cpp:
            (WebCore::::immediatelyReportUnsafeAccessTo):
    2010-12-14  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Adam Barth.
    
            [V8] Get rid of delayed exception reporting in V8ConsoleMessage.cpp
            https://bugs.webkit.org/show_bug.cgi?id=51044
    
            * src/ChromeClientImpl.cpp:
            (WebKit::ChromeClientImpl::runJavaScriptAlert):
            * src/WebScriptController.cpp:
            (WebKit::WebScriptController::flushConsoleMessages):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76224 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index dfcb4a0..fb63894 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2010-12-14  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        [V8] Get rid of delayed exception reporting in V8ConsoleMessage.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=51044
+
+        * WebCore.gypi:
+        * bindings/v8/V8ConsoleMessage.cpp: Removed.
+        * bindings/v8/V8ConsoleMessage.h: Removed.
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::v8UncaughtExceptionHandler):
+        (WebCore::reportUnsafeJavaScriptAccess):
+        (WebCore::V8DOMWindowShell::initContextIfNeeded):
+        * bindings/v8/V8Proxy.cpp:
+        (WebCore::addMessageToConsole):
+        (WebCore::logInfo):
+        (WebCore::V8Proxy::reportUnsafeAccessTo):
+        (WebCore::V8Proxy::runScript):
+        (WebCore::V8Proxy::callFunction):
+        (WebCore::V8Proxy::newInstance):
+        * bindings/v8/V8Proxy.h:
+        * bindings/v8/WorkerContextExecutionProxy.cpp:
+        * bindings/v8/specialization/V8BindingState.cpp:
+        (WebCore::::immediatelyReportUnsafeAccessTo):
+
 2011-01-19  MORITA Hajime  <morrita at google.com>
 
         Reviewed by Eric Seidel.
diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi
index 8492e1e..2b275ed 100644
--- a/Source/WebCore/WebCore.gypi
+++ b/Source/WebCore/WebCore.gypi
@@ -949,8 +949,6 @@
             'bindings/v8/V8Binding.h',
             'bindings/v8/V8Collection.cpp',
             'bindings/v8/V8Collection.h',
-            'bindings/v8/V8ConsoleMessage.cpp',
-            'bindings/v8/V8ConsoleMessage.h',
             'bindings/v8/V8DataGridDataSource.cpp',
             'bindings/v8/V8DataGridDataSource.h',
             'bindings/v8/V8DOMMap.cpp',
diff --git a/Source/WebCore/bindings/v8/V8ConsoleMessage.cpp b/Source/WebCore/bindings/v8/V8ConsoleMessage.cpp
deleted file mode 100644
index d92822c..0000000
--- a/Source/WebCore/bindings/v8/V8ConsoleMessage.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "V8ConsoleMessage.h"
-
-#include "Console.h"
-#include "DOMWindow.h"
-#include "Frame.h"
-#include "OwnPtr.h"
-#include "Page.h"
-#include "ScriptCallStack.h"
-#include "ScriptCallStackFactory.h"
-#include "V8Binding.h"
-#include "V8Proxy.h"
-
-namespace WebCore {
-
-Vector<V8ConsoleMessage>* V8ConsoleMessage::m_delayedMessages = 0;
-
-V8ConsoleMessage::V8ConsoleMessage(const String& string, const String& sourceID, unsigned lineNumber)
-     : m_string(string)
-     , m_sourceID(sourceID)
-     , m_lineNumber(lineNumber)
-{
-}
-
-void V8ConsoleMessage::dispatchNow(Page* page)
-{
-    ASSERT(page);
-
-    // Process any delayed messages to make sure that messages
-    // appear in the right order in the console.
-    processDelayed();
-
-    Console* console = page->mainFrame()->domWindow()->console();
-    console->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, m_string, m_lineNumber, m_sourceID);
-}
-
-void V8ConsoleMessage::dispatchLater()
-{
-    if (!m_delayedMessages) {
-        // Allocate a vector for the delayed messages. Will be
-        // deallocated when the delayed messages are processed
-        // in processDelayed().
-        m_delayedMessages = new Vector<V8ConsoleMessage>();
-    }
-
-    m_delayedMessages->append(*this);
-}
-
-void V8ConsoleMessage::processDelayed()
-{
-    if (!m_delayedMessages)
-        return;
-
-    // Take ownership of the delayed vector to avoid re-entrancy issues.
-    OwnPtr<Vector<V8ConsoleMessage> > delayedMessages(m_delayedMessages);
-    m_delayedMessages = 0;
-
-    // If we have a delayed vector it cannot be empty.
-    ASSERT(!delayedMessages->isEmpty());
-
-    // Add the delayed messages to the page of the active
-    // context. If that for some bizarre reason does not
-    // exist, we clear the list of delayed messages to avoid
-    // posting messages. We still deallocate the vector.
-    Frame* frame = V8Proxy::retrieveFrameForEnteredContext();
-    if (!frame)
-        return;
-    Page* page = frame->page();
-    if (!page)
-        return;
-
-    // Iterate through all the delayed messages and add them
-    // to the console.
-    const int size = delayedMessages->size();
-    for (int i = 0; i < size; ++i)
-        delayedMessages->at(i).dispatchNow(page);
-}
-
-void V8ConsoleMessage::handler(v8::Handle<v8::Message> message, v8::Handle<v8::Value> data)
-{
-    // Use the frame where JavaScript is called from.
-    Frame* frame = V8Proxy::retrieveFrameForEnteredContext();
-    if (!frame)
-        return;
-    Document* document = frame->document();
-    if (!document)
-        return;
-
-    v8::Handle<v8::String> errorMessageString = message->Get();
-    ASSERT(!errorMessageString.IsEmpty());
-    String errorMessage = toWebCoreString(errorMessageString);
-
-    v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace();
-    RefPtr<ScriptCallStack> callStack;
-    // Currently stack trace is only collected when inspector is open.
-    if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0)
-        callStack = createScriptCallStack(stackTrace, ScriptCallStack::maxCallStackSizeToCapture);
-
-    v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
-    bool useURL = resourceName.IsEmpty() || !resourceName->IsString();
-    String resourceNameString = useURL ? frame->document()->url() : toWebCoreString(resourceName);
-    document->reportException(errorMessage, message->GetLineNumber(), resourceNameString, callStack);
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8ConsoleMessage.h b/Source/WebCore/bindings/v8/V8ConsoleMessage.h
deleted file mode 100644
index 6183fc6..0000000
--- a/Source/WebCore/bindings/v8/V8ConsoleMessage.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef V8ConsoleMessage_h
-#define V8ConsoleMessage_h
-
-#include "PlatformString.h"
-#include <v8.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-    class Page;
-    class ScriptCallStack;
-
-    // V8ConsoleMessage encapsulates everything needed to
-    // log messages originating from JavaScript to the console.
-    class V8ConsoleMessage {
-    public:
-        V8ConsoleMessage(const String& string, const String& sourceID, unsigned lineNumber);
-
-        // Add a message to the console. May end up calling JavaScript code
-        // indirectly through the inspector so only call this function when
-        // it is safe to do allocations.
-        void dispatchNow(Page*);
-
-        // Add a message to the console but delay the reporting until it
-        // is safe to do so: Either when we leave JavaScript execution or
-        // when adding other console messages. The primary purpose of this
-        // method is to avoid calling into V8 to handle console messages
-        // when the VM is in a state that does not support GCs or allocations.
-        // Delayed messages are always reported in the page corresponding
-        // to the active context.
-        void dispatchLater();
-
-        // Process any delayed messages. May end up calling JavaScript code
-        // indirectly through the inspector so only call this function when
-        // it is safe to do allocations.
-        static void processDelayed();
-
-        // Convenience class for ensuring that delayed messages in the
-        // ConsoleMessageManager are processed quickly.
-        class Scope {
-        public:
-            Scope() { V8ConsoleMessage::processDelayed(); }
-            ~Scope() { V8ConsoleMessage::processDelayed(); }
-        };
-
-        // Callback from V8.
-        static void handler(v8::Handle<v8::Message>, v8::Handle<v8::Value> data);
-
-    private:
-        const String m_string;
-        const String m_sourceID;
-        const unsigned m_lineNumber;
-
-        // All delayed messages are stored in this vector. If the vector
-        // is 0, there are no delayed messages.
-        static Vector<V8ConsoleMessage>* m_delayedMessages;
-    };
-
-} // namespace WebCore
-
-#endif // V8ConsoleMessage_h
diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
index 8205fe5..f4b1eb7 100644
--- a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
+++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
@@ -39,12 +39,13 @@
 #include "FrameLoaderClient.h"
 #include "Page.h"
 #include "PageGroup.h"
+#include "ScriptCallStack.h"
+#include "ScriptCallStackFactory.h"
 #include "ScriptController.h"
 #include "StorageNamespace.h"
 #include "V8Binding.h"
 #include "V8BindingState.h"
 #include "V8Collection.h"
-#include "V8ConsoleMessage.h"
 #include "V8DOMMap.h"
 #include "V8DOMWindow.h"
 #include "V8Document.h"
@@ -90,6 +91,30 @@ static void reportFatalErrorInV8(const char* location, const char* message)
     handleFatalErrorInV8();
 }
 
+static void v8UncaughtExceptionHandler(v8::Handle<v8::Message> message, v8::Handle<v8::Value> data)
+{
+    // Use the frame where JavaScript is called from.
+    Frame* frame = V8Proxy::retrieveFrameForEnteredContext();
+    if (!frame)
+        return;
+
+    v8::Handle<v8::String> errorMessageString = message->Get();
+    ASSERT(!errorMessageString.IsEmpty());
+    String errorMessage = toWebCoreString(errorMessageString);
+
+    v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace();
+    RefPtr<ScriptCallStack> callStack;
+    // Currently stack trace is only collected when inspector is open.
+    if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0)
+        callStack = createScriptCallStack(stackTrace, ScriptCallStack::maxCallStackSizeToCapture);
+
+    v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
+    bool useURL = resourceName.IsEmpty() || !resourceName->IsString();
+    Document* document = frame->document();
+    String resourceNameString = useURL ? document->url() : toWebCoreString(resourceName);
+    document->reportException(errorMessage, message->GetLineNumber(), resourceNameString, callStack);
+}
+
 // Returns the owner frame pointer of a DOM wrapper object. It only works for
 // these DOM objects requiring cross-domain access check.
 static Frame* getTargetFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data)
@@ -117,7 +142,7 @@ static void reportUnsafeJavaScriptAccess(v8::Local<v8::Object> host, v8::AccessT
 {
     Frame* target = getTargetFrame(host, data);
     if (target)
-        V8Proxy::reportUnsafeAccessTo(target, V8Proxy::ReportLater);
+        V8Proxy::reportUnsafeAccessTo(target);
 }
 
 PassRefPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame)
@@ -262,7 +287,7 @@ bool V8DOMWindowShell::initContextIfNeeded()
         v8::V8::SetGlobalGCPrologueCallback(&V8GCController::gcPrologue);
         v8::V8::SetGlobalGCEpilogueCallback(&V8GCController::gcEpilogue);
 
-        v8::V8::AddMessageListener(&V8ConsoleMessage::handler);
+        v8::V8::AddMessageListener(&v8UncaughtExceptionHandler);
 
         v8::V8::SetFailedAccessCheckCallbackFunction(reportUnsafeJavaScriptAccess);
 
diff --git a/Source/WebCore/bindings/v8/V8Proxy.cpp b/Source/WebCore/bindings/v8/V8Proxy.cpp
index 1c1f642..46989c8 100644
--- a/Source/WebCore/bindings/v8/V8Proxy.cpp
+++ b/Source/WebCore/bindings/v8/V8Proxy.cpp
@@ -50,7 +50,6 @@
 #include "V8Binding.h"
 #include "V8BindingState.h"
 #include "V8Collection.h"
-#include "V8ConsoleMessage.h"
 #include "V8DOMCoreException.h"
 #include "V8DOMMap.h"
 #include "V8DOMWindow.h"
@@ -131,21 +130,22 @@ typedef HashMap<int, v8::FunctionTemplate*> FunctionTemplateMap;
 
 bool AllowAllocation::m_current = false;
 
+static void addMessageToConsole(Page* page, const String& message, const String& sourceID, unsigned lineNumber)
+{
+    ASSERT(page);
+    Console* console = page->mainFrame()->domWindow()->console();
+    console->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, lineNumber, sourceID);
+}
+
 void logInfo(Frame* frame, const String& message, const String& url)
 {
     Page* page = frame->page();
     if (!page)
         return;
-    V8ConsoleMessage consoleMessage(message, url, 0);
-    consoleMessage.dispatchNow(page);
+    addMessageToConsole(page, message, url, 0);
 }
 
-enum DelayReporting {
-    ReportLater,
-    ReportNow
-};
-
-void V8Proxy::reportUnsafeAccessTo(Frame* target, DelayReporting delay)
+void V8Proxy::reportUnsafeAccessTo(Frame* target)
 {
     ASSERT(target);
     Document* targetDocument = target->document();
@@ -166,20 +166,11 @@ void V8Proxy::reportUnsafeAccessTo(Frame* target, DelayReporting delay)
     // Build a console message with fake source ID and line number.
     const String kSourceID = "";
     const int kLineNumber = 1;
-    V8ConsoleMessage message(str, kSourceID, kLineNumber);
 
-    if (delay == ReportNow) {
-        // NOTE: Safari prints the message in the target page, but it seems like
-        // it should be in the source page. Even for delayed messages, we put it in
-        // the source page; see V8ConsoleMessage::processDelayed().
-        message.dispatchNow(source->page());
-    } else {
-        ASSERT(delay == ReportLater);
-        // We cannot safely report the message eagerly, because this may cause
-        // allocations and GCs internally in V8 and we cannot handle that at this
-        // point. Therefore we delay the reporting.
-        message.dispatchLater();
-    }
+    // NOTE: Safari prints the message in the target page, but it seems like
+    // it should be in the source page. Even for delayed messages, we put it in
+    // the source page.
+    addMessageToConsole(source->page(), str, kSourceID, kLineNumber);
 }
 
 static void handleFatalErrorInV8()
@@ -412,8 +403,6 @@ v8::Local<v8::Value> V8Proxy::runScript(v8::Handle<v8::Script> script, bool isIn
     // Run the script and keep track of the current recursion depth.
     v8::Local<v8::Value> result;
     {
-        V8ConsoleMessage::Scope scope;
-
         // See comment in V8Proxy::callFunction.
         m_frame->keepAlive();
 
@@ -446,8 +435,6 @@ v8::Local<v8::Value> V8Proxy::callFunction(v8::Handle<v8::Function> function, v8
     V8GCController::checkMemoryUsage();
     v8::Local<v8::Value> result;
     {
-        V8ConsoleMessage::Scope scope;
-
         if (m_recursion >= kMaxRecursionDepth) {
             v8::Local<v8::String> code = v8::String::New("throw new RangeError('Maximum call stack size exceeded.')");
             if (code.IsEmpty())
@@ -511,8 +498,6 @@ v8::Local<v8::Value> V8Proxy::newInstance(v8::Handle<v8::Function> constructor,
     // V8Proxy::callFunction.
     v8::Local<v8::Value> result;
     {
-        V8ConsoleMessage::Scope scope;
-
         // See comment in V8Proxy::callFunction.
         m_frame->keepAlive();
 
@@ -774,11 +759,6 @@ v8::Handle<v8::Value> V8Proxy::checkNewLegal(const v8::Arguments& args)
     return args.This();
 }
 
-void V8Proxy::processConsoleMessages()
-{
-    V8ConsoleMessage::processDelayed();
-}
-
 void V8Proxy::registerExtensionWithV8(v8::Extension* extension)
 {
     // If the extension exists in our list, it was already registered with V8.
diff --git a/Source/WebCore/bindings/v8/V8Proxy.h b/Source/WebCore/bindings/v8/V8Proxy.h
index e5a17af..3e7f37a 100644
--- a/Source/WebCore/bindings/v8/V8Proxy.h
+++ b/Source/WebCore/bindings/v8/V8Proxy.h
@@ -132,12 +132,6 @@ namespace WebCore {
             GeneralError
         };
 
-        // When to report errors.
-        enum DelayReporting {
-            ReportLater,
-            ReportNow
-        };
-
         explicit V8Proxy(Frame*);
 
         ~V8Proxy();
@@ -263,9 +257,6 @@ namespace WebCore {
         template <typename T>
         static v8::Handle<v8::Value> constructDOMObjectWithScriptExecutionContext(const v8::Arguments&, WrapperTypeInfo*);
 
-        // Process any pending JavaScript console messages.
-        static void processConsoleMessages();
-
         v8::Local<v8::Context> context();
         v8::Local<v8::Context> mainWorldContext();
 
@@ -286,7 +277,7 @@ namespace WebCore {
         static const V8Extensions& extensions() { return m_extensions; }
 
         // Report an unsafe attempt to access the given frame on the console.
-        static void reportUnsafeAccessTo(Frame* target, DelayReporting delay);
+        static void reportUnsafeAccessTo(Frame* target);
 
     private:
         void didLeaveScriptContext();
diff --git a/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp b/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
index eb25814..aef892a 100644
--- a/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
+++ b/Source/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp
@@ -41,7 +41,6 @@
 #include "SharedWorker.h"
 #include "SharedWorkerContext.h"
 #include "V8Binding.h"
-#include "V8ConsoleMessage.h"
 #include "V8DOMMap.h"
 #include "V8DedicatedWorkerContext.h"
 #include "V8Proxy.h"
diff --git a/Source/WebCore/bindings/v8/specialization/V8BindingState.cpp b/Source/WebCore/bindings/v8/specialization/V8BindingState.cpp
index 891272c..e00e35b 100644
--- a/Source/WebCore/bindings/v8/specialization/V8BindingState.cpp
+++ b/Source/WebCore/bindings/v8/specialization/V8BindingState.cpp
@@ -81,7 +81,7 @@ Frame* State<V8Binding>::firstFrame()
 
 void State<V8Binding>::immediatelyReportUnsafeAccessTo(Frame* target)
 {
-    V8Proxy::reportUnsafeAccessTo(target, V8Proxy::ReportNow);
+    V8Proxy::reportUnsafeAccessTo(target);
 }
 
 bool State<V8Binding>::processingUserGesture()
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 27afde9..4f645fc 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-14  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        [V8] Get rid of delayed exception reporting in V8ConsoleMessage.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=51044
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::runJavaScriptAlert):
+        * src/WebScriptController.cpp:
+        (WebKit::WebScriptController::flushConsoleMessages):
+
 2010-12-27  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
index 826c3b8..84d46c7 100644
--- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -436,11 +436,6 @@ void ChromeClientImpl::closeWindowSoon()
 void ChromeClientImpl::runJavaScriptAlert(Frame* frame, const String& message)
 {
     if (m_webView->client()) {
-#if USE(V8)
-        // Before showing the JavaScript dialog, we give the proxy implementation
-        // a chance to process any pending console messages.
-        V8Proxy::processConsoleMessages();
-#endif
         m_webView->client()->runModalAlertDialog(
             WebFrameImpl::fromFrame(frame), message);
     }
diff --git a/Source/WebKit/chromium/src/WebScriptController.cpp b/Source/WebKit/chromium/src/WebScriptController.cpp
index 0aa11a6..10bc68f 100644
--- a/Source/WebKit/chromium/src/WebScriptController.cpp
+++ b/Source/WebKit/chromium/src/WebScriptController.cpp
@@ -54,7 +54,7 @@ void WebScriptController::enableV8SingleThreadMode()
 
 void WebScriptController::flushConsoleMessages()
 {
-    WebCore::V8Proxy::processConsoleMessages();
+    // FIXME: remove this method after all it's usages are gone.
 }
 
 } // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list