Changeset 102794 in webkit
- Timestamp:
- Dec 14, 2011 10:03:32 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102793 r102794 1 2011-12-14 Kenneth Russell <kbr@google.com> 2 3 Unreviewed, rolling out r102688. 4 http://trac.webkit.org/changeset/102688 5 https://bugs.webkit.org/show_bug.cgi?id=74220 6 7 Under the hypothesis that it might be the cause of 8 browser_tests and ui_tests crashes on Chromium canaries -- 9 will reland if not. 10 11 * bindings/v8/V8Proxy.cpp: 12 (WebCore::addMessageToConsole): 13 (WebCore::logInfo): 14 (WebCore::V8Proxy::reportUnsafeAccessTo): 15 * bindings/v8/V8Proxy.h: 16 * bindings/v8/custom/V8CustomXPathNSResolver.cpp: 17 (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): 18 1 19 2011-12-14 Vsevolod Vlasov <vsevik@chromium.org> 2 20 -
trunk/Source/WebCore/bindings/v8/V8Proxy.cpp
r102688 r102794 34 34 #include "CSSMutableStyleDeclaration.h" 35 35 #include "CachedMetadata.h" 36 #include "Console.h" 36 37 #include "DateExtension.h" 37 38 #include "Document.h" … … 43 44 #include "IDBFactoryBackendInterface.h" 44 45 #include "InspectorInstrumentation.h" 46 #include "Page.h" 45 47 #include "PlatformSupport.h" 46 48 #include "ScriptSourceCode.h" … … 118 120 typedef HashMap<int, v8::FunctionTemplate*> FunctionTemplateMap; 119 121 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 120 137 void V8Proxy::reportUnsafeAccessTo(Frame* target) 121 138 { … … 128 145 if (!source) 129 146 return; 147 Page* page = source->page(); 148 if (!page) 149 return; 130 150 131 151 Document* sourceDocument = source->document(); … … 138 158 " from frame with URL " + sourceDocument->url().string() + ". Domains, protocols and ports must match.\n"; 139 159 160 // Build a console message with fake source ID and line number. 161 const String kSourceID = ""; 162 const int kLineNumber = 1; 163 140 164 // NOTE: Safari prints the message in the target page, but it seems like 141 165 // it should be in the source page. Even for delayed messages, we put it in 142 166 // the source page. 143 sourceDocument->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, str);167 addMessageToConsole(page, str, kSourceID, kLineNumber); 144 168 } 145 169 -
trunk/Source/WebCore/bindings/v8/V8Proxy.h
r102688 r102794 66 66 class WorldContextHandle; 67 67 68 // FIXME: use standard logging facilities in WebCore. 69 void logInfo(Frame*, const String& message, const String& url); 70 68 71 // The following Batch structs and methods are used for setting multiple 69 72 // properties on an ObjectTemplate, used from the generated bindings -
trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp
r102688 r102794 31 31 #include "V8CustomXPathNSResolver.h" 32 32 33 #include "ScriptCallStack.h" 34 #include "ScriptExecutionContext.h" 33 #include "PlatformString.h" 35 34 #include "V8Binding.h" 36 35 #include "V8Proxy.h" 37 #include "V8Utilities.h"38 #include <wtf/text/WTFString.h>39 36 40 37 namespace WebCore { … … 67 64 68 65 if (lookupNamespaceURIFunc.IsEmpty() && !m_resolver->IsFunction()) { 69 if (ScriptExecutionContext* context = getScriptExecutionContext()) 70 context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.", 0, String(), 0); 66 if (V8Proxy* proxy = V8Proxy::retrieve()) { 67 if (Frame* frame = proxy->frame()) 68 logInfo(frame, "XPathNSResolver does not have a lookupNamespaceURI method.", String()); 69 } 71 70 return String(); 72 71 }
Note: See TracChangeset
for help on using the changeset viewer.