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

Side by Side Diff: Source/bindings/core/v8/WindowProxy.cpp

Issue 957973002: remove security check from Window (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 void WindowProxy::clearForNavigation() 134 void WindowProxy::clearForNavigation()
135 { 135 {
136 if (!isContextInitialized()) 136 if (!isContextInitialized())
137 return; 137 return;
138 138
139 ScriptState::Scope scope(m_scriptState.get()); 139 ScriptState::Scope scope(m_scriptState.get());
140 140
141 m_document.clear(); 141 m_document.clear();
142
143 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototypeChai n(m_global.newLocal(m_isolate), m_isolate);
144 ASSERT(!windowWrapper.IsEmpty());
145 windowWrapper->TurnOnAccessCheck();
146 disposeContext(DetachGlobal); 142 disposeContext(DetachGlobal);
147 } 143 }
148 144
149 // Create a new environment and setup the global object. 145 // Create a new environment and setup the global object.
150 // 146 //
151 // The global object corresponds to a DOMWindow instance. However, to 147 // The global object corresponds to a DOMWindow instance. However, to
152 // allow properties of the JS DOMWindow instance to be shadowed, we 148 // allow properties of the JS DOMWindow instance to be shadowed, we
153 // use a shadow object as the global object and use the JS DOMWindow 149 // use a shadow object as the global object and use the JS DOMWindow
154 // instance as the prototype for that shadow object. The JS DOMWindow 150 // instance as the prototype for that shadow object. The JS DOMWindow
155 // instance is undetectable from JavaScript code because the __proto__ 151 // instance is undetectable from JavaScript code because the __proto__
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 483
488 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) 484 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin)
489 { 485 {
490 ASSERT(m_world->isMainWorld()); 486 ASSERT(m_world->isMainWorld());
491 if (!isContextInitialized()) 487 if (!isContextInitialized())
492 return; 488 return;
493 setSecurityToken(origin); 489 setSecurityToken(origin);
494 } 490 }
495 491
496 } // namespace blink 492 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698