| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 return; | 395 return; |
| 396 | 396 |
| 397 if (m_frame->isRemoteFrame()) { | 397 if (m_frame->isRemoteFrame()) { |
| 398 return; | 398 return; |
| 399 } | 399 } |
| 400 | 400 |
| 401 ScriptState::Scope scope(m_scriptState.get()); | 401 ScriptState::Scope scope(m_scriptState.get()); |
| 402 v8::Local<v8::Context> context = m_scriptState->context(); | 402 v8::Local<v8::Context> context = m_scriptState->context(); |
| 403 LocalFrame* frame = toLocalFrame(m_frame); | 403 LocalFrame* frame = toLocalFrame(m_frame); |
| 404 v8::Local<v8::Value> documentWrapper = toV8(frame->document(), context->Glob
al(), context->GetIsolate()); | 404 v8::Local<v8::Value> documentWrapper = toV8(frame->document(), context->Glob
al(), context->GetIsolate()); |
| 405 if (documentWrapper.IsEmpty()) | |
| 406 return; | |
| 407 ASSERT(documentWrapper == m_document.newLocal(m_isolate) || m_document.isEmp
ty()); | 405 ASSERT(documentWrapper == m_document.newLocal(m_isolate) || m_document.isEmp
ty()); |
| 408 if (m_document.isEmpty()) | 406 if (m_document.isEmpty()) |
| 409 updateDocumentWrapper(v8::Local<v8::Object>::Cast(documentWrapper)); | 407 updateDocumentWrapper(v8::Local<v8::Object>::Cast(documentWrapper)); |
| 410 checkDocumentWrapper(m_document.newLocal(m_isolate), frame->document()); | 408 checkDocumentWrapper(m_document.newLocal(m_isolate), frame->document()); |
| 411 | 409 |
| 412 ASSERT(documentWrapper->IsObject()); | 410 ASSERT(documentWrapper->IsObject()); |
| 413 // TODO(jochen): Don't replace the accessor with a data value. We need a way
to tell v8 that the accessor's return value won't change after this point. | 411 // TODO(jochen): Don't replace the accessor with a data value. We need a way
to tell v8 that the accessor's return value won't change after this point. |
| 414 if (!v8CallBoolean(context->Global()->ForceSet(context, v8AtomicString(m_iso
late, "document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadO
nly | v8::DontDelete)))) | 412 if (!v8CallBoolean(context->Global()->ForceSet(context, v8AtomicString(m_iso
late, "document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadO
nly | v8::DontDelete)))) |
| 415 return; | 413 return; |
| 416 } | 414 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 } | 551 } |
| 554 | 552 |
| 555 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 553 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
| 556 { | 554 { |
| 557 if (!isContextInitialized()) | 555 if (!isContextInitialized()) |
| 558 return; | 556 return; |
| 559 setSecurityToken(origin); | 557 setSecurityToken(origin); |
| 560 } | 558 } |
| 561 | 559 |
| 562 } // namespace blink | 560 } // namespace blink |
| OLD | NEW |