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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 v8::HandleScope handleScope; | 570 v8::HandleScope handleScope; |
571 v8::Context::Scope contextScope(m_context); | 571 v8::Context::Scope contextScope(m_context); |
572 | 572 |
573 ASSERT(!m_document.IsEmpty()); | 573 ASSERT(!m_document.IsEmpty()); |
574 checkDocumentWrapper(m_document, doc); | 574 checkDocumentWrapper(m_document, doc); |
575 m_document->SetAccessor(v8String(name), getter); | 575 m_document->SetAccessor(v8String(name), getter); |
576 } | 576 } |
577 | 577 |
578 void V8DOMWindowShell::namedItemRemoved(HTMLDocument* doc, const AtomicString& n
ame) | 578 void V8DOMWindowShell::namedItemRemoved(HTMLDocument* doc, const AtomicString& n
ame) |
579 { | 579 { |
| 580 if (doc->hasNamedItem(name.impl()) || doc->hasExtraNamedItem(name.impl())) |
| 581 return; |
| 582 |
| 583 if (!initContextIfNeeded()) |
| 584 return; |
| 585 |
| 586 v8::HandleScope handleScope; |
| 587 v8::Context::Scope contextScope(m_context); |
| 588 |
| 589 ASSERT(!m_document.IsEmpty()); |
| 590 checkDocumentWrapper(m_document, doc); |
| 591 m_document->Delete(v8String(name)); |
580 } | 592 } |
581 | 593 |
582 void V8DOMWindowShell::updateSecurityOrigin() | 594 void V8DOMWindowShell::updateSecurityOrigin() |
583 { | 595 { |
584 v8::HandleScope scope; | 596 v8::HandleScope scope; |
585 setSecurityToken(); | 597 setSecurityToken(); |
586 } | 598 } |
587 | 599 |
588 v8::Handle<v8::Value> V8DOMWindowShell::getHiddenObjectPrototype(v8::Handle<v8::
Context> context) | 600 v8::Handle<v8::Value> V8DOMWindowShell::getHiddenObjectPrototype(v8::Handle<v8::
Context> context) |
589 { | 601 { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 return notHandledByInterceptor(); | 641 return notHandledByInterceptor(); |
630 } | 642 } |
631 | 643 |
632 void V8DOMWindowShell::setLocation(DOMWindow* window, const String& locationStri
ng) | 644 void V8DOMWindowShell::setLocation(DOMWindow* window, const String& locationStri
ng) |
633 { | 645 { |
634 State<V8Binding>* state = V8BindingState::Only(); | 646 State<V8Binding>* state = V8BindingState::Only(); |
635 window->setLocation(locationString, state->activeWindow(), state->firstWindo
w()); | 647 window->setLocation(locationString, state->activeWindow(), state->firstWindo
w()); |
636 } | 648 } |
637 | 649 |
638 } // WebCore | 650 } // WebCore |
OLD | NEW |