Changeset 62868 in webkit
- Timestamp:
- Jul 8, 2010 4:57:53 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r62846 r62868 1 2010-07-08 John Abd-El-Malek <jam@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [V8] Navigation policy doesn't play nicely with pepper plugins 6 https://bugs.webkit.org/show_bug.cgi?id=41864 7 8 * bindings/v8/V8Utilities.cpp: 9 (WebCore::callingOrEnteredFrame): 10 (WebCore::shouldAllowNavigation): 11 (WebCore::navigateIfAllowed): 12 1 13 2010-07-08 Jon Honeycutt <jhoneycutt@apple.com> 2 14 -
trunk/WebCore/bindings/v8/V8Utilities.cpp
r57767 r62868 101 101 } 102 102 103 Frame* callingOrEnteredFrame() 104 { 105 Frame* frame = V8Proxy::retrieveFrameForCallingContext(); 106 if (!frame) { 107 // Unfortunately, when processing script from a plug-in, we might not 108 // have a calling context. In those cases, we fall back to the 109 // entered context for security checks. 110 // FIXME: We need a better API for retrieving frames that abstracts 111 // away this concern. 112 frame = V8Proxy::retrieveFrameForEnteredContext(); 113 } 114 return frame; 115 } 116 103 117 bool shouldAllowNavigation(Frame* frame) 104 118 { 105 Frame* calling Frame = V8Proxy::retrieveFrameForCallingContext();106 return calling Frame && callingFrame->loader()->shouldAllowNavigation(frame);119 Frame* callingOrEntered = callingOrEnteredFrame(); 120 return callingOrEntered && callingOrEntered->loader()->shouldAllowNavigation(frame); 107 121 } 108 122 … … 118 132 void navigateIfAllowed(Frame* frame, const KURL& url, bool lockHistory, bool lockBackForwardList) 119 133 { 120 Frame* calling Frame = V8Proxy::retrieveFrameForCallingContext();121 if (!calling Frame)134 Frame* callingOrEntered = callingOrEnteredFrame(); 135 if (!callingOrEntered) 122 136 return; 123 124 137 if (!protocolIsJavaScript(url) || ScriptController::isSafeScript(frame)) 125 frame->redirectScheduler()->scheduleLocationChange(url.string(), calling Frame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList, processingUserGesture());138 frame->redirectScheduler()->scheduleLocationChange(url.string(), callingOrEntered->loader()->outgoingReferrer(), lockHistory, lockBackForwardList, processingUserGesture()); 126 139 } 127 140
Note: See TracChangeset
for help on using the changeset viewer.