| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 MessagePort* port = MessagePort::create(context); | 269 MessagePort* port = MessagePort::create(context); |
| 270 port->entangle((*channels)[i].release()); | 270 port->entangle((*channels)[i].release()); |
| 271 (*portArray)[i] = port; | 271 (*portArray)[i] = port; |
| 272 } | 272 } |
| 273 return portArray; | 273 return portArray; |
| 274 } | 274 } |
| 275 | 275 |
| 276 DEFINE_TRACE(MessagePort) | 276 DEFINE_TRACE(MessagePort) |
| 277 { | 277 { |
| 278 ActiveDOMObject::trace(visitor); | 278 ActiveDOMObject::trace(visitor); |
| 279 EventTargetWithInlineData::trace(visitor); | 279 RefCountedGarbageCollectedEventTargetWithInlineData<MessagePort>::trace(visi
tor); |
| 280 } | 280 } |
| 281 | 281 |
| 282 v8::Isolate* MessagePort::scriptIsolate() | 282 v8::Isolate* MessagePort::scriptIsolate() |
| 283 { | 283 { |
| 284 ASSERT(executionContext()); | 284 ASSERT(executionContext()); |
| 285 return toIsolate(executionContext()); | 285 return toIsolate(executionContext()); |
| 286 } | 286 } |
| 287 | 287 |
| 288 v8::Local<v8::Context> MessagePort::scriptContextForMessageConversion() | 288 v8::Local<v8::Context> MessagePort::scriptContextForMessageConversion() |
| 289 { | 289 { |
| 290 ASSERT(executionContext()); | 290 ASSERT(executionContext()); |
| 291 if (!m_scriptStateForConversion) { | 291 if (!m_scriptStateForConversion) { |
| 292 v8::Isolate* isolate = scriptIsolate(); | 292 v8::Isolate* isolate = scriptIsolate(); |
| 293 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat
e), DOMWrapperWorld::create(isolate)); | 293 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat
e), DOMWrapperWorld::create(isolate)); |
| 294 } | 294 } |
| 295 return m_scriptStateForConversion->context(); | 295 return m_scriptStateForConversion->context(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace blink | 298 } // namespace blink |
| OLD | NEW |