Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: Source/core/dom/MessagePort.cpp

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698