Changeset 102871 in webkit


Ignore:
Timestamp:
Dec 14, 2011 7:22:03 PM (12 years ago)
Author:
kbr@google.com
Message:

Unreviewed, rolling out r102794.
http://trac.webkit.org/changeset/102794
https://bugs.webkit.org/show_bug.cgi?id=74220

Reapplying patch since it is not the cause of the problems
described in bug 74220.

  • bindings/v8/V8Proxy.cpp:

(WebCore::V8Proxy::reportUnsafeAccessTo):

  • bindings/v8/V8Proxy.h:
  • bindings/v8/custom/V8CustomXPathNSResolver.cpp:

(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r102867 r102871  
     12011-12-14  Kenneth Russell  <kbr@google.com>
     2
     3        Unreviewed, rolling out r102794.
     4        http://trac.webkit.org/changeset/102794
     5        https://bugs.webkit.org/show_bug.cgi?id=74220
     6
     7        Reapplying patch since it is not the cause of the problems
     8        described in bug 74220.
     9
     10        * bindings/v8/V8Proxy.cpp:
     11        (WebCore::V8Proxy::reportUnsafeAccessTo):
     12        * bindings/v8/V8Proxy.h:
     13        * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
     14        (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
     15
    1162011-12-14  Sam Weinig  <weinig@apple.com>
    217
  • trunk/Source/WebCore/bindings/v8/V8Proxy.cpp

    r102794 r102871  
    3434#include "CSSMutableStyleDeclaration.h"
    3535#include "CachedMetadata.h"
    36 #include "Console.h"
    3736#include "DateExtension.h"
    3837#include "Document.h"
     
    4443#include "IDBFactoryBackendInterface.h"
    4544#include "InspectorInstrumentation.h"
    46 #include "Page.h"
    4745#include "PlatformSupport.h"
    4846#include "ScriptSourceCode.h"
     
    120118typedef HashMap<int, v8::FunctionTemplate*> FunctionTemplateMap;
    121119
    122 static void addMessageToConsole(Page* page, const String& message, const String& sourceID, unsigned lineNumber)
    123 {
    124     ASSERT(page);
    125     Console* console = page->mainFrame()->domWindow()->console();
    126     console->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, message, lineNumber, sourceID);
    127 }
    128 
    129 void logInfo(Frame* frame, const String& message, const String& url)
    130 {
    131     Page* page = frame->page();
    132     if (!page)
    133         return;
    134     addMessageToConsole(page, message, url, 0);
    135 }
    136 
    137120void V8Proxy::reportUnsafeAccessTo(Frame* target)
    138121{
     
    145128    if (!source)
    146129        return;
    147     Page* page = source->page();
    148     if (!page)
    149         return;
    150130
    151131    Document* sourceDocument = source->document();
     
    158138                 " from frame with URL " + sourceDocument->url().string() + ". Domains, protocols and ports must match.\n";
    159139
    160     // Build a console message with fake source ID and line number.
    161     const String kSourceID = "";
    162     const int kLineNumber = 1;
    163 
    164140    // NOTE: Safari prints the message in the target page, but it seems like
    165141    // it should be in the source page. Even for delayed messages, we put it in
    166142    // the source page.
    167     addMessageToConsole(page, str, kSourceID, kLineNumber);
     143    sourceDocument->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, str);
    168144}
    169145
  • trunk/Source/WebCore/bindings/v8/V8Proxy.h

    r102794 r102871  
    6666    class WorldContextHandle;
    6767
    68     // FIXME: use standard logging facilities in WebCore.
    69     void logInfo(Frame*, const String& message, const String& url);
    70 
    7168    // The following Batch structs and methods are used for setting multiple
    7269    // properties on an ObjectTemplate, used from the generated bindings
  • trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp

    r102794 r102871  
    3131#include "V8CustomXPathNSResolver.h"
    3232
    33 #include "PlatformString.h"
     33#include "ScriptCallStack.h"
     34#include "ScriptExecutionContext.h"
    3435#include "V8Binding.h"
    3536#include "V8Proxy.h"
     37#include "V8Utilities.h"
     38#include <wtf/text/WTFString.h>
    3639
    3740namespace WebCore {
     
    6467
    6568    if (lookupNamespaceURIFunc.IsEmpty() && !m_resolver->IsFunction()) {
    66         if (V8Proxy* proxy = V8Proxy::retrieve()) {
    67             if (Frame* frame = proxy->frame())
    68                 logInfo(frame, "XPathNSResolver does not have a lookupNamespaceURI method.", String());
    69         }
     69        if (ScriptExecutionContext* context = getScriptExecutionContext())
     70            context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.", 0, String(), 0);
    7071        return String();
    7172    }
Note: See TracChangeset for help on using the changeset viewer.