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

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

Issue 537403002: bindings: Renames from/toInternalPointer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 // 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/RespondWithObserver.h" 6 #include "modules/serviceworkers/RespondWithObserver.h"
7 7
8 #include "bindings/core/v8/ScriptFunction.h" 8 #include "bindings/core/v8/ScriptFunction.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptValue.h" 10 #include "bindings/core/v8/ScriptValue.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 void RespondWithObserver::responseWasFulfilled(const ScriptValue& value) 108 void RespondWithObserver::responseWasFulfilled(const ScriptValue& value)
109 { 109 {
110 if (!executionContext()) 110 if (!executionContext())
111 return; 111 return;
112 if (!V8Response::hasInstance(value.v8Value(), toIsolate(executionContext())) ) { 112 if (!V8Response::hasInstance(value.v8Value(), toIsolate(executionContext())) ) {
113 responseWasRejected(); 113 responseWasRejected();
114 return; 114 return;
115 } 115 }
116 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value.v8Value() ); 116 v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(value.v8Value() );
117 sendResponse(V8Response::toNative(object)); 117 sendResponse(V8Response::toImpl(object));
118 } 118 }
119 119
120 RespondWithObserver::RespondWithObserver(ExecutionContext* context, int eventID) 120 RespondWithObserver::RespondWithObserver(ExecutionContext* context, int eventID)
121 : ContextLifecycleObserver(context) 121 : ContextLifecycleObserver(context)
122 , m_eventID(eventID) 122 , m_eventID(eventID)
123 , m_state(Initial) 123 , m_state(Initial)
124 { 124 {
125 } 125 }
126 126
127 } // namespace blink 127 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/RequestInit.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698