Changeset 56849 in webkit
- Timestamp:
- Mar 31, 2010 10:01:30 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56846 r56849 1 2010-03-31 Pavel Feldman <pfeldman@chromium.org> 2 3 Not reviewed. Rolling out r56829 since it broke chromium layout tests. 4 5 [REGRESSION] Inspector tests started crashing since r56829 6 https://bugs.webkit.org/show_bug.cgi?id=36888 7 8 * bindings/scripts/CodeGeneratorV8.pm: 9 * bindings/v8/V8Utilities.cpp: 10 * bindings/v8/V8Utilities.h: 11 * loader/FrameLoaderClient.h: 12 1 13 2010-03-31 Pavel Feldman <pfeldman@chromium.org> 2 14 -
trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm
r56829 r56849 675 675 } elsif ($attribute->signature->extendedAttributes->{"CheckFrameSecurity"}) { 676 676 push(@implContentDecls, " if (!V8BindingSecurity::checkNodeSecurity(V8BindingState::Only(), imp->contentDocument())) return v8::Handle<v8::Value>();\n\n"); 677 }678 679 if ($attrExt->{"DoNotCheckDomainSecurity"} ||680 $attrExt->{"DoNotCheckDomainSecurityOnGet"}) {681 push(@implContentDecls, " logPropertyAccess(name, info);\n");682 677 } 683 678 … … 1452 1447 "#include \"V8BindingState.h\"\n" . 1453 1448 "#include \"V8DOMWrapper.h\"\n" . 1454 "#include \"V8Utilities.h\"\n" .1455 1449 "#include \"V8IsolatedContext.h\"\n\n" . 1456 1450 "#undef LOG\n\n"); -
trunk/WebCore/bindings/v8/V8Utilities.cpp
r56829 r56849 34 34 #include <v8.h> 35 35 36 #include "ChromiumBridge.h"37 36 #include "Document.h" 38 37 #include "Frame.h" 39 #include "FrameLoaderClient.h"40 38 #include "ScriptExecutionContext.h" 41 39 #include "ScriptState.h" 42 40 #include "V8Binding.h" 43 #include "V8BindingState.h"44 #include "V8DOMWindow.h"45 41 #include "V8Proxy.h" 46 42 #include "WorkerContext.h" … … 147 143 } 148 144 149 void logPropertyAccess(v8::Local<v8::String> name, const v8::AccessorInfo& info)150 {151 Frame* target = V8DOMWindow::toNative(info.Holder())->frame();152 Frame* active = V8BindingState::Only()->getActiveWindow()->frame();153 if (target == active)154 return;155 156 bool crossSite = !V8BindingSecurity::canAccessFrame(V8BindingState::Only(), target, false);157 String propName = toWebCoreString(name);158 159 // For cross-site, we also want to identify the current event to record repeat accesses.160 unsigned long long eventId = 0;161 if (crossSite) {162 v8::HandleScope handleScope;163 v8::Handle<v8::Context> v8Context = V8Proxy::mainWorldContext(active);164 if (!v8Context.IsEmpty()) {165 v8::Context::Scope scope(v8Context);166 v8::Handle<v8::Object> global = v8Context->Global();167 v8::Handle<v8::Value> jsEvent = global->Get(v8::String::NewSymbol("event"));168 if (V8DOMWrapper::isValidDOMObject(jsEvent))169 eventId = reinterpret_cast<unsigned long long>(V8Event::toNative(v8::Handle<v8::Object>::Cast(jsEvent)));170 }171 }172 active->loader()->client()->logCrossFramePropertyAccess(target, crossSite, propName, eventId);173 }174 175 145 } // namespace WebCore -
trunk/WebCore/bindings/v8/V8Utilities.h
r56829 r56849 57 57 ScriptExecutionContext* getScriptExecutionContext(); 58 58 59 void logPropertyAccess(v8::Local<v8::String> name, const v8::AccessorInfo& info);60 61 59 class AllowAllocation { 62 60 public: -
trunk/WebCore/loader/FrameLoaderClient.h
r56829 r56849 245 245 virtual void didDestroyScriptContextForFrame() = 0; 246 246 virtual void didCreateIsolatedScriptContext() = 0; 247 248 virtual void logCrossFramePropertyAccess(Frame* target, bool crossOrigin, const String& name, unsigned long long eventId) { }249 247 #endif 250 248 -
trunk/WebKit/chromium/ChangeLog
r56836 r56849 1 2010-03-31 Pavel Feldman <pfeldman@chromium.org> 2 3 Not reviewed. Rolling out r56829 since it broke chromium layout tests. 4 5 [REGRESSION] Inspector tests started crashing since r56829 6 https://bugs.webkit.org/show_bug.cgi?id=36888 7 8 * public/WebFrameClient.h: 9 * src/FrameLoaderClientImpl.cpp: 10 * src/FrameLoaderClientImpl.h: 11 1 12 2010-03-31 Yury Semikhatsky <yurys@chromium.org> 2 13 -
trunk/WebKit/chromium/public/WebFrameClient.h
r56829 r56849 285 285 virtual void didCreateIsolatedScriptContext(WebFrame*) { } 286 286 287 // Notifies that a cross-frame access was made to a property that allows288 // cross-origin access.289 virtual void logCrossFramePropertyAccess(WebFrame* active, WebFrame* target, bool crossOrigin, const WebString& property, unsigned long long eventId) { }290 291 287 292 288 // Geometry notifications ---------------------------------------------- -
trunk/WebKit/chromium/src/FrameLoaderClientImpl.cpp
r56829 r56849 1506 1506 } 1507 1507 1508 void FrameLoaderClientImpl::logCrossFramePropertyAccess(Frame* target, bool crossOrigin, const String& name, unsigned long long eventId)1509 {1510 m_webFrame->client()->logCrossFramePropertyAccess(m_webFrame, WebFrameImpl::fromFrame(target), crossOrigin, name, eventId);1511 }1512 1513 1508 } // namespace WebKit -
trunk/WebKit/chromium/src/FrameLoaderClientImpl.h
r56829 r56849 200 200 virtual void didNotAllowPlugins(); 201 201 202 virtual void logCrossFramePropertyAccess(203 WebCore::Frame* target,204 bool crossOrigin,205 const WebCore::String& name,206 unsigned long long eventId);207 208 202 private: 209 203 void makeDocumentView();
Note: See TracChangeset
for help on using the changeset viewer.