| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |