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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerMessagingProxy.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 * Copyright (C) 2009 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 { 60 {
61 WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext); 61 WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext);
62 globalScope->exceptionHandled(exceptionId, handled); 62 globalScope->exceptionHandled(exceptionId, handled);
63 } 63 }
64 64
65 void processMessageOnWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message , PassOwnPtr<MessagePortChannelArray> channels, WorkerObjectProxy* workerObjectP roxy, ExecutionContext* scriptContext) 65 void processMessageOnWorkerGlobalScope(PassRefPtr<SerializedScriptValue> message , PassOwnPtr<MessagePortChannelArray> channels, WorkerObjectProxy* workerObjectP roxy, ExecutionContext* scriptContext)
66 { 66 {
67 WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext); 67 WorkerGlobalScope* globalScope = toWorkerGlobalScope(scriptContext);
68 MessagePortArray* ports = MessagePort::entanglePorts(*scriptContext, channel s); 68 MessagePortArray* ports = MessagePort::entanglePorts(*scriptContext, channel s);
69 globalScope->dispatchEvent(MessageEvent::create(ports, message)); 69 globalScope->dispatchEvent(MessageEvent::create(ports, message));
70 workerObjectProxy->confirmMessageFromWorkerObject(V8GCController::hasPending Activity(scriptContext)); 70 workerObjectProxy->confirmMessageFromWorkerObject(V8GCController::hasPending Activity(globalScope->thread()->isolate(), scriptContext));
71 } 71 }
72 72
73 } // namespace 73 } // namespace
74 74
75 WorkerMessagingProxy::WorkerMessagingProxy(InProcessWorkerBase* workerObject, Pa ssOwnPtrWillBeRawPtr<WorkerClients> workerClients) 75 WorkerMessagingProxy::WorkerMessagingProxy(InProcessWorkerBase* workerObject, Pa ssOwnPtrWillBeRawPtr<WorkerClients> workerClients)
76 : m_executionContext(workerObject->getExecutionContext()) 76 : m_executionContext(workerObject->getExecutionContext())
77 , m_workerObjectProxy(WorkerObjectProxy::create(this)) 77 , m_workerObjectProxy(WorkerObjectProxy::create(this))
78 , m_workerObject(workerObject) 78 , m_workerObject(workerObject)
79 , m_mayBeDestroyed(false) 79 , m_mayBeDestroyed(false)
80 , m_unconfirmedMessageCount(0) 80 , m_unconfirmedMessageCount(0)
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 // FIXME: This need to be revisited when we support nested worker one day 285 // FIXME: This need to be revisited when we support nested worker one day
286 ASSERT(m_executionContext->isDocument()); 286 ASSERT(m_executionContext->isDocument());
287 Document* document = toDocument(m_executionContext.get()); 287 Document* document = toDocument(m_executionContext.get());
288 LocalFrame* frame = document->frame(); 288 LocalFrame* frame = document->frame();
289 if (frame) 289 if (frame)
290 frame->console().adoptWorkerMessagesAfterTermination(m_workerInspectorPr oxy.get()); 290 frame->console().adoptWorkerMessagesAfterTermination(m_workerInspectorPr oxy.get());
291 } 291 }
292 292
293 } // namespace blink 293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698