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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 namespace blink { 44 namespace blink {
45 45
46 MessagePort* MessagePort::create(ExecutionContext& executionContext) 46 MessagePort* MessagePort::create(ExecutionContext& executionContext)
47 { 47 {
48 MessagePort* port = new MessagePort(executionContext); 48 MessagePort* port = new MessagePort(executionContext);
49 port->suspendIfNeeded(); 49 port->suspendIfNeeded();
50 return port; 50 return port;
51 } 51 }
52 52
53 MessagePort::MessagePort(ExecutionContext& executionContext) 53 MessagePort::MessagePort(ExecutionContext& executionContext)
54 : ActiveDOMObject(&executionContext) 54 : ActiveScriptWrappable(this)
55 , ActiveDOMObject(&executionContext)
55 , m_started(false) 56 , m_started(false)
56 , m_closed(false) 57 , m_closed(false)
57 , m_weakFactory(this) 58 , m_weakFactory(this)
58 { 59 {
59 } 60 }
60 61
61 MessagePort::~MessagePort() 62 MessagePort::~MessagePort()
62 { 63 {
63 close(); 64 close();
64 if (m_scriptStateForConversion) 65 if (m_scriptStateForConversion)
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 { 293 {
293 ASSERT(getExecutionContext()); 294 ASSERT(getExecutionContext());
294 if (!m_scriptStateForConversion) { 295 if (!m_scriptStateForConversion) {
295 v8::Isolate* isolate = scriptIsolate(); 296 v8::Isolate* isolate = scriptIsolate();
296 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat e), DOMWrapperWorld::create(isolate)); 297 m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolat e), DOMWrapperWorld::create(isolate));
297 } 298 }
298 return m_scriptStateForConversion->context(); 299 return m_scriptStateForConversion->context();
299 } 300 }
300 301
301 } // namespace blink 302 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698