| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // If there are JS code holds a closure to the old inner window, | 140 // If there are JS code holds a closure to the old inner window, |
| 141 // it won't be able to reach the outer window via its global object. | 141 // it won't be able to reach the outer window via its global object. |
| 142 void WindowProxy::initializeIfNeeded() { | 142 void WindowProxy::initializeIfNeeded() { |
| 143 // TODO(haraken): It is wrong to re-initialize an already detached window | 143 // TODO(haraken): It is wrong to re-initialize an already detached window |
| 144 // proxy. This must be 'if(m_lifecycle == Lifecycle::ContextUninitialized)'. | 144 // proxy. This must be 'if(m_lifecycle == Lifecycle::ContextUninitialized)'. |
| 145 if (m_lifecycle != Lifecycle::ContextInitialized) { | 145 if (m_lifecycle != Lifecycle::ContextInitialized) { |
| 146 initialize(); | 146 initialize(); |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 v8::Local<v8::Object> WindowProxy::associateWithWrapper( |
| 151 DOMWindow* window, |
| 152 const WrapperTypeInfo* wrapperTypeInfo, |
| 153 v8::Local<v8::Object> wrapper) { |
| 154 if (m_world->domDataStore().set(m_isolate, window, wrapperTypeInfo, |
| 155 wrapper)) { |
| 156 wrapperTypeInfo->wrapperCreated(); |
| 157 V8DOMWrapper::setNativeInfo(m_isolate, wrapper, wrapperTypeInfo, window); |
| 158 DCHECK(V8DOMWrapper::hasInternalFieldsSet(wrapper)); |
| 159 } |
| 160 SECURITY_CHECK(toScriptWrappable(wrapper) == window); |
| 161 return wrapper; |
| 162 } |
| 163 |
| 150 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |