Changeset 102871 in webkit
- Timestamp:
- Dec 14, 2011 7:22:03 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102867 r102871 1 2011-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 1 16 2011-12-14 Sam Weinig <weinig@apple.com> 2 17 -
trunk/Source/WebCore/bindings/v8/V8Proxy.cpp
r102794 r102871 34 34 #include "CSSMutableStyleDeclaration.h" 35 35 #include "CachedMetadata.h" 36 #include "Console.h"37 36 #include "DateExtension.h" 38 37 #include "Document.h" … … 44 43 #include "IDBFactoryBackendInterface.h" 45 44 #include "InspectorInstrumentation.h" 46 #include "Page.h"47 45 #include "PlatformSupport.h" 48 46 #include "ScriptSourceCode.h" … … 120 118 typedef HashMap<int, v8::FunctionTemplate*> FunctionTemplateMap; 121 119 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 137 120 void V8Proxy::reportUnsafeAccessTo(Frame* target) 138 121 { … … 145 128 if (!source) 146 129 return; 147 Page* page = source->page();148 if (!page)149 return;150 130 151 131 Document* sourceDocument = source->document(); … … 158 138 " from frame with URL " + sourceDocument->url().string() + ". Domains, protocols and ports must match.\n"; 159 139 160 // Build a console message with fake source ID and line number.161 const String kSourceID = "";162 const int kLineNumber = 1;163 164 140 // NOTE: Safari prints the message in the target page, but it seems like 165 141 // it should be in the source page. Even for delayed messages, we put it in 166 142 // the source page. 167 addMessageToConsole(page, str, kSourceID, kLineNumber);143 sourceDocument->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, str); 168 144 } 169 145 -
trunk/Source/WebCore/bindings/v8/V8Proxy.h
r102794 r102871 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 71 68 // The following Batch structs and methods are used for setting multiple 72 69 // properties on an ObjectTemplate, used from the generated bindings -
trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp
r102794 r102871 31 31 #include "V8CustomXPathNSResolver.h" 32 32 33 #include "PlatformString.h" 33 #include "ScriptCallStack.h" 34 #include "ScriptExecutionContext.h" 34 35 #include "V8Binding.h" 35 36 #include "V8Proxy.h" 37 #include "V8Utilities.h" 38 #include <wtf/text/WTFString.h> 36 39 37 40 namespace WebCore { … … 64 67 65 68 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); 70 71 return String(); 71 72 }
Note: See TracChangeset
for help on using the changeset viewer.