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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
461 token = frameSecurityToken + token; | 461 token = frameSecurityToken + token; |
462 } | 462 } |
463 | 463 |
464 // NOTE: V8 does identity comparison in fast path, must use a symbol | 464 // NOTE: V8 does identity comparison in fast path, must use a symbol |
465 // as the security token. | 465 // as the security token. |
466 context->SetSecurityToken(v8AtomicString(m_isolate, token)); | 466 context->SetSecurityToken(v8AtomicString(m_isolate, token)); |
467 } | 467 } |
468 | 468 |
469 void WindowProxy::updateDocument() { | 469 void WindowProxy::updateDocument() { |
470 DCHECK(m_world->isMainWorld()); | 470 DCHECK(m_world->isMainWorld()); |
471 if (!isGlobalInitialized()) | |
472 return; | |
473 if (!isContextInitialized()) | 471 if (!isContextInitialized()) |
haraken
2016/12/28 08:45:43
Actually I think this check is wrong. updateDocume
Yuki
2016/12/28 08:53:19
Why updateDocument should run when the context is
| |
474 return; | 472 return; |
473 | |
475 updateActivityLogger(); | 474 updateActivityLogger(); |
476 updateDocumentProperty(); | 475 updateDocumentProperty(); |
477 updateSecurityOrigin(m_frame->securityContext()->getSecurityOrigin()); | 476 updateSecurityOrigin(m_frame->securityContext()->getSecurityOrigin()); |
478 } | 477 } |
479 | 478 |
480 static v8::Local<v8::Value> getNamedProperty( | 479 static v8::Local<v8::Value> getNamedProperty( |
481 HTMLDocument* htmlDocument, | 480 HTMLDocument* htmlDocument, |
482 const AtomicString& key, | 481 const AtomicString& key, |
483 v8::Local<v8::Object> creationContext, | 482 v8::Local<v8::Object> creationContext, |
484 v8::Isolate* isolate) { | 483 v8::Isolate* isolate) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
559 .ToChecked(); | 558 .ToChecked(); |
560 } | 559 } |
561 | 560 |
562 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) { | 561 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) { |
563 if (!isContextInitialized()) | 562 if (!isContextInitialized()) |
564 return; | 563 return; |
565 setSecurityToken(origin); | 564 setSecurityToken(origin); |
566 } | 565 } |
567 | 566 |
568 } // namespace blink | 567 } // namespace blink |
OLD | NEW |