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

Side by Side Diff: Source/modules/serviceworkers/WaitUntilObserver.cpp

Issue 326853002: Revert of Add an ASSERT about cross-world wrapper leakage into ScriptValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/modules/serviceworkers/WaitUntilObserver.h ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/serviceworkers/WaitUntilObserver.h" 6 #include "modules/serviceworkers/WaitUntilObserver.h"
7 7
8 #include "bindings/v8/ScriptFunction.h" 8 #include "bindings/v8/ScriptFunction.h"
9 #include "bindings/v8/ScriptPromise.h" 9 #include "bindings/v8/ScriptPromise.h"
10 #include "bindings/v8/ScriptValue.h" 10 #include "bindings/v8/ScriptValue.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void WaitUntilObserver::willDispatchEvent() 68 void WaitUntilObserver::willDispatchEvent()
69 { 69 {
70 incrementPendingActivity(); 70 incrementPendingActivity();
71 } 71 }
72 72
73 void WaitUntilObserver::didDispatchEvent() 73 void WaitUntilObserver::didDispatchEvent()
74 { 74 {
75 decrementPendingActivity(); 75 decrementPendingActivity();
76 } 76 }
77 77
78 void WaitUntilObserver::waitUntil(ScriptState* scriptState, const ScriptValue& v alue) 78 void WaitUntilObserver::waitUntil(const ScriptValue& value)
79 { 79 {
80 incrementPendingActivity(); 80 incrementPendingActivity();
81 ScriptPromise::cast(scriptState, value).then( 81 ScriptPromise::cast(value).then(
82 ThenFunction::create(this, ThenFunction::Fulfilled), 82 ThenFunction::create(this, ThenFunction::Fulfilled),
83 ThenFunction::create(this, ThenFunction::Rejected)); 83 ThenFunction::create(this, ThenFunction::Rejected));
84 } 84 }
85 85
86 WaitUntilObserver::WaitUntilObserver(ExecutionContext* context, EventType type, int eventID) 86 WaitUntilObserver::WaitUntilObserver(ExecutionContext* context, EventType type, int eventID)
87 : ContextLifecycleObserver(context) 87 : ContextLifecycleObserver(context)
88 , m_type(type) 88 , m_type(type)
89 , m_eventID(eventID) 89 , m_eventID(eventID)
90 , m_pendingActivity(0) 90 , m_pendingActivity(0)
91 , m_hasError(false) 91 , m_hasError(false)
(...skipping 26 matching lines...) Expand all
118 client->didHandleActivateEvent(m_eventID, result); 118 client->didHandleActivateEvent(m_eventID, result);
119 break; 119 break;
120 case Install: 120 case Install:
121 client->didHandleInstallEvent(m_eventID, result); 121 client->didHandleInstallEvent(m_eventID, result);
122 break; 122 break;
123 } 123 }
124 observeContext(0); 124 observeContext(0);
125 } 125 }
126 126
127 } // namespace WebCore 127 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/WaitUntilObserver.h ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698