| 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 ASSERT(m_world->isMainWorld()); | 526 ASSERT(m_world->isMainWorld()); |
| 527 | 527 |
| 528 if (!isContextInitialized() || !m_scriptState->contextIsValid()) | 528 if (!isContextInitialized() || !m_scriptState->contextIsValid()) |
| 529 return; | 529 return; |
| 530 | 530 |
| 531 ScriptState::Scope scope(m_scriptState.get()); | 531 ScriptState::Scope scope(m_scriptState.get()); |
| 532 ASSERT(!m_document.isEmpty()); | 532 ASSERT(!m_document.isEmpty()); |
| 533 v8::Local<v8::Context> context = m_scriptState->context(); | 533 v8::Local<v8::Context> context = m_scriptState->context(); |
| 534 v8::Local<v8::Object> documentHandle = m_document.newLocal(m_isolate); | 534 v8::Local<v8::Object> documentHandle = m_document.newLocal(m_isolate); |
| 535 checkDocumentWrapper(documentHandle, document); | 535 checkDocumentWrapper(documentHandle, document); |
| 536 documentHandle->SetAccessor(context, v8String(m_isolate, name), getter); | 536 if (documentHandle->SetAccessor(context, v8String(m_isolate, name), getter).
IsNothing()) { |
| 537 // TODO: What action, if any, should be taken here? |
| 538 } |
| 537 } | 539 } |
| 538 | 540 |
| 539 void WindowProxy::namedItemRemoved(HTMLDocument* document, const AtomicString& n
ame) | 541 void WindowProxy::namedItemRemoved(HTMLDocument* document, const AtomicString& n
ame) |
| 540 { | 542 { |
| 541 ASSERT(m_world->isMainWorld()); | 543 ASSERT(m_world->isMainWorld()); |
| 542 | 544 |
| 543 if (!isContextInitialized()) | 545 if (!isContextInitialized()) |
| 544 return; | 546 return; |
| 545 | 547 |
| 546 if (document->hasNamedItem(name) || document->hasExtraNamedItem(name)) | 548 if (document->hasNamedItem(name) || document->hasExtraNamedItem(name)) |
| 547 return; | 549 return; |
| 548 | 550 |
| 549 ScriptState::Scope scope(m_scriptState.get()); | 551 ScriptState::Scope scope(m_scriptState.get()); |
| 550 ASSERT(!m_document.isEmpty()); | 552 ASSERT(!m_document.isEmpty()); |
| 551 v8::Local<v8::Object> documentHandle = m_document.newLocal(m_isolate); | 553 v8::Local<v8::Object> documentHandle = m_document.newLocal(m_isolate); |
| 552 checkDocumentWrapper(documentHandle, document); | 554 checkDocumentWrapper(documentHandle, document); |
| 553 documentHandle->Delete(m_isolate->GetCurrentContext(), v8String(m_isolate, n
ame)); | 555 if (documentHandle->Delete(m_isolate->GetCurrentContext(), v8String(m_isolat
e, name)).IsNothing()) { |
| 556 // TODO: What action, if any, should be taken here? |
| 557 } |
| 554 } | 558 } |
| 555 | 559 |
| 556 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 560 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
| 557 { | 561 { |
| 558 if (!isContextInitialized()) | 562 if (!isContextInitialized()) |
| 559 return; | 563 return; |
| 560 setSecurityToken(origin); | 564 setSecurityToken(origin); |
| 561 } | 565 } |
| 562 | 566 |
| 563 } // namespace blink | 567 } // namespace blink |
| OLD | NEW |