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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 return v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype()); | 277 return v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype()); |
278 } | 278 } |
279 | 279 |
280 bool V8WindowShell::installDOMWindow() | 280 bool V8WindowShell::installDOMWindow() |
281 { | 281 { |
282 LocalDOMWindow* window = m_frame->domWindow(); | 282 LocalDOMWindow* window = m_frame->domWindow(); |
283 v8::Local<v8::Object> windowWrapper = V8ObjectConstructor::newInstance(m_iso
late, m_scriptState->perContextData()->constructorForType(&V8Window::wrapperType
Info)); | 283 v8::Local<v8::Object> windowWrapper = V8ObjectConstructor::newInstance(m_iso
late, m_scriptState->perContextData()->constructorForType(&V8Window::wrapperType
Info)); |
284 if (windowWrapper.IsEmpty()) | 284 if (windowWrapper.IsEmpty()) |
285 return false; | 285 return false; |
286 | 286 |
287 V8Window::installConditionallyEnabledProperties(windowWrapper, m_isolate); | 287 V8Window::installPerContextEnabledProperties(windowWrapper, window, m_isolat
e); |
288 | 288 |
289 V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object>::Cast(win
dowWrapper->GetPrototype()), &V8Window::wrapperTypeInfo, window); | 289 V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object>::Cast(win
dowWrapper->GetPrototype()), &V8Window::wrapperTypeInfo, window); |
290 | 290 |
291 // Install the windowWrapper as the prototype of the innerGlobalObject. | 291 // Install the windowWrapper as the prototype of the innerGlobalObject. |
292 // The full structure of the global object is as follows: | 292 // The full structure of the global object is as follows: |
293 // | 293 // |
294 // outerGlobalObject (Empty object, remains after navigation) | 294 // outerGlobalObject (Empty object, remains after navigation) |
295 // -- has prototype --> innerGlobalObject (Holds global variables, changes
during navigation) | 295 // -- has prototype --> innerGlobalObject (Holds global variables, changes
during navigation) |
296 // -- has prototype --> LocalDOMWindow instance | 296 // -- has prototype --> LocalDOMWindow instance |
297 // -- has prototype --> Window.prototype | 297 // -- has prototype --> Window.prototype |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 | 484 |
485 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) | 485 void V8WindowShell::updateSecurityOrigin(SecurityOrigin* origin) |
486 { | 486 { |
487 ASSERT(m_world->isMainWorld()); | 487 ASSERT(m_world->isMainWorld()); |
488 if (!isContextInitialized()) | 488 if (!isContextInitialized()) |
489 return; | 489 return; |
490 setSecurityToken(origin); | 490 setSecurityToken(origin); |
491 } | 491 } |
492 | 492 |
493 } // namespace blink | 493 } // namespace blink |
OLD | NEW |