Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/resources/xss-eval2.html

Issue 1374533002: Null out LocalDOMWindow::m_frame on navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try to fix crash-on-querying-event-path.html Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/resources/xss-eval2.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/resources/xss-eval2.html b/third_party/WebKit/LayoutTests/http/tests/security/resources/xss-eval2.html
index 462cd58d82be9321ac8e31f786aa4c62c938ac7f..33253cb3c03cc34eea1d2ee5b06f378fe93162a8 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/resources/xss-eval2.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/resources/xss-eval2.html
@@ -3,9 +3,15 @@ document.testExpando = "It's me too!";
parent.childEval = eval;
-parent.childEvalCaller = function(s) {
- return window.eval(s);
-}
+parent.childEvalCaller = (function()
+{
+ // Capture window.window into a variable, since this property always returns null once
+ // the context is navigated.
+ var w = window;
+ return function(s) {
+ return w.eval(s);
+ }
+})();
parent.childLocalEvalCaller = (function()
{

Powered by Google App Engine
This is Rietveld 408576698