| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 if (m_lifecycle == Lifecycle::ContextDetached) | 394 if (m_lifecycle == Lifecycle::ContextDetached) |
| 395 return; | 395 return; |
| 396 | 396 |
| 397 ScriptState::Scope scope(m_scriptState.get()); | 397 ScriptState::Scope scope(m_scriptState.get()); |
| 398 v8::Local<v8::Object> documentWrapper = | 398 v8::Local<v8::Object> documentWrapper = |
| 399 m_world->domDataStore().get(document, isolate()); | 399 m_world->domDataStore().get(document, isolate()); |
| 400 // TODO(yukishiino,peria): We should check if the own property with the same | 400 // TODO(yukishiino,peria): We should check if the own property with the same |
| 401 // name already exists or not, and if it exists, we shouldn't define a new | 401 // name already exists or not, and if it exists, we shouldn't define a new |
| 402 // accessor property (it fails). | 402 // accessor property (it fails). |
| 403 documentWrapper->SetAccessor(isolate()->GetCurrentContext(), | 403 documentWrapper->SetAccessor(isolate()->GetCurrentContext(), |
| 404 v8String(isolate(), name), getter); | 404 v8String(isolate(), name), getter).ToChecked(); |
| 405 } | 405 } |
| 406 | 406 |
| 407 void LocalWindowProxy::namedItemRemoved(HTMLDocument* document, | 407 void LocalWindowProxy::namedItemRemoved(HTMLDocument* document, |
| 408 const AtomicString& name) { | 408 const AtomicString& name) { |
| 409 DCHECK(m_world->isMainWorld()); | 409 DCHECK(m_world->isMainWorld()); |
| 410 | 410 |
| 411 // Context must be initialized before this point. | 411 // Context must be initialized before this point. |
| 412 DCHECK(m_lifecycle >= Lifecycle::ContextInitialized); | 412 DCHECK(m_lifecycle >= Lifecycle::ContextInitialized); |
| 413 // TODO(yukishiino): Is it okay to not update named properties | 413 // TODO(yukishiino): Is it okay to not update named properties |
| 414 // after the context gets detached? | 414 // after the context gets detached? |
| (...skipping 22 matching lines...) Expand all Loading... |
| 437 | 437 |
| 438 setSecurityToken(origin); | 438 setSecurityToken(origin); |
| 439 } | 439 } |
| 440 | 440 |
| 441 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate, | 441 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate, |
| 442 LocalFrame& frame, | 442 LocalFrame& frame, |
| 443 RefPtr<DOMWrapperWorld> world) | 443 RefPtr<DOMWrapperWorld> world) |
| 444 : WindowProxy(isolate, frame, std::move(world)) {} | 444 : WindowProxy(isolate, frame, std::move(world)) {} |
| 445 | 445 |
| 446 } // namespace blink | 446 } // namespace blink |
| OLD | NEW |