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

Side by Side Diff: Source/modules/crypto/CryptoResultImpl.cpp

Issue 1079003002: bindings: v8::Handle -> v8::Local in Source/Modules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed build errors Created 5 years, 8 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
« no previous file with comments | « Source/modules/cachestorage/CacheTest.cpp ('k') | Source/modules/crypto/NormalizeAlgorithm.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 clearResolver(); 144 clearResolver();
145 } 145 }
146 146
147 void CryptoResultImpl::completeWithJson(const char* utf8Data, unsigned length) 147 void CryptoResultImpl::completeWithJson(const char* utf8Data, unsigned length)
148 { 148 {
149 if (m_resolver) { 149 if (m_resolver) {
150 ScriptPromiseResolver* resolver = m_resolver; 150 ScriptPromiseResolver* resolver = m_resolver;
151 ScriptState* scriptState = resolver->scriptState(); 151 ScriptState* scriptState = resolver->scriptState();
152 ScriptState::Scope scope(scriptState); 152 ScriptState::Scope scope(scriptState);
153 153
154 v8::Handle<v8::String> jsonString = v8AtomicString(scriptState->isolate( ), utf8Data, length); 154 v8::Local<v8::String> jsonString = v8AtomicString(scriptState->isolate() , utf8Data, length);
155 155
156 v8::TryCatch exceptionCatcher; 156 v8::TryCatch exceptionCatcher;
157 v8::Local<v8::Value> jsonDictionary; 157 v8::Local<v8::Value> jsonDictionary;
158 if (v8Call(v8::JSON::Parse(scriptState->isolate(), jsonString), jsonDict ionary, exceptionCatcher)) 158 if (v8Call(v8::JSON::Parse(scriptState->isolate(), jsonString), jsonDict ionary, exceptionCatcher))
159 resolver->resolve(jsonDictionary); 159 resolver->resolve(jsonDictionary);
160 else 160 else
161 resolver->reject(exceptionCatcher.Exception()); 161 resolver->reject(exceptionCatcher.Exception());
162 } 162 }
163 clearResolver(); 163 clearResolver();
164 } 164 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 m_resolver = Resolver::create(scriptState, this).get(); 215 m_resolver = Resolver::create(scriptState, this).get();
216 } 216 }
217 } 217 }
218 218
219 ScriptPromise CryptoResultImpl::promise() 219 ScriptPromise CryptoResultImpl::promise()
220 { 220 {
221 return m_resolver ? m_resolver->promise() : ScriptPromise(); 221 return m_resolver ? m_resolver->promise() : ScriptPromise();
222 } 222 }
223 223
224 } // namespace blink 224 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/cachestorage/CacheTest.cpp ('k') | Source/modules/crypto/NormalizeAlgorithm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698