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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 token = frameSecurityToken + token; | 453 token = frameSecurityToken + token; |
454 } | 454 } |
455 | 455 |
456 // NOTE: V8 does identity comparison in fast path, must use a symbol | 456 // NOTE: V8 does identity comparison in fast path, must use a symbol |
457 // as the security token. | 457 // as the security token. |
458 context->SetSecurityToken(v8AtomicString(m_isolate, token)); | 458 context->SetSecurityToken(v8AtomicString(m_isolate, token)); |
459 } | 459 } |
460 | 460 |
461 void WindowProxy::updateDocument() { | 461 void WindowProxy::updateDocument() { |
462 DCHECK(m_world->isMainWorld()); | 462 DCHECK(m_world->isMainWorld()); |
| 463 // For an uninitialized main window proxy, there's nothing we need |
| 464 // to update. The update is done when the window proxy gets initialized later. |
463 if (!isContextInitialized()) | 465 if (!isContextInitialized()) |
464 return; | 466 return; |
465 | 467 |
466 updateActivityLogger(); | 468 updateActivityLogger(); |
467 updateDocumentProperty(); | 469 updateDocumentProperty(); |
468 updateSecurityOrigin(m_frame->securityContext()->getSecurityOrigin()); | 470 updateSecurityOrigin(m_frame->securityContext()->getSecurityOrigin()); |
469 } | 471 } |
470 | 472 |
471 static v8::Local<v8::Value> getNamedProperty( | 473 static v8::Local<v8::Value> getNamedProperty( |
472 HTMLDocument* htmlDocument, | 474 HTMLDocument* htmlDocument, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 .ToChecked(); | 551 .ToChecked(); |
550 } | 552 } |
551 | 553 |
552 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) { | 554 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) { |
553 if (!isContextInitialized()) | 555 if (!isContextInitialized()) |
554 return; | 556 return; |
555 setSecurityToken(origin); | 557 setSecurityToken(origin); |
556 } | 558 } |
557 | 559 |
558 } // namespace blink | 560 } // namespace blink |
OLD | NEW |