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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 266 } |
267 return portArray; | 267 return portArray; |
268 } | 268 } |
269 | 269 |
270 DEFINE_TRACE(MessagePort) | 270 DEFINE_TRACE(MessagePort) |
271 { | 271 { |
272 ActiveDOMObject::trace(visitor); | 272 ActiveDOMObject::trace(visitor); |
273 EventTargetWithInlineData::trace(visitor); | 273 EventTargetWithInlineData::trace(visitor); |
274 } | 274 } |
275 | 275 |
276 v8::Isolate* MessagePort::scriptIsolate() | |
277 { | |
278 DCHECK(getExecutionContext()); | |
279 return toIsolate(getExecutionContext()); | |
280 } | |
281 | |
282 v8::Local<v8::Context> MessagePort::scriptContextForMessageConversion() | |
283 { | |
284 DCHECK(getExecutionContext()); | |
285 if (!m_scriptStateForConversion) { | |
286 v8::Isolate* isolate = scriptIsolate(); | |
287 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat
e), DOMWrapperWorld::create(isolate)); | |
288 } | |
289 return m_scriptStateForConversion->context(); | |
290 } | |
291 | |
292 } // namespace blink | 276 } // namespace blink |
OLD | NEW |