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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes 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 // 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 "bindings/modules/v8/ScriptValueSerializerForModules.h" 5 #include "bindings/modules/v8/ScriptValueSerializerForModules.h"
6 6
7 #include "bindings/core/v8/SerializationTag.h" 7 #include "bindings/core/v8/SerializationTag.h"
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/modules/v8/V8CryptoKey.h" 9 #include "bindings/modules/v8/V8CryptoKey.h"
10 #include "bindings/modules/v8/V8DOMFileSystem.h" 10 #include "bindings/modules/v8/V8DOMFileSystem.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 { 335 {
336 uint32_t type; 336 uint32_t type;
337 String name; 337 String name;
338 String url; 338 String url;
339 if (!doReadUint32(&type)) 339 if (!doReadUint32(&type))
340 return false; 340 return false;
341 if (!readWebCoreString(&name)) 341 if (!readWebCoreString(&name))
342 return false; 342 return false;
343 if (!readWebCoreString(&url)) 343 if (!readWebCoreString(&url))
344 return false; 344 return false;
345 DOMFileSystem* fs = DOMFileSystem::create(scriptState()->executionContext(), name, static_cast<FileSystemType>(type), KURL(ParsedURLString, url)); 345 DOMFileSystem* fs = DOMFileSystem::create(getScriptState()->getExecutionCont ext(), name, static_cast<FileSystemType>(type), KURL(ParsedURLString, url));
346 *value = toV8(fs, scriptState()->context()->Global(), isolate()); 346 *value = toV8(fs, getScriptState()->context()->Global(), isolate());
347 return !value->IsEmpty(); 347 return !value->IsEmpty();
348 } 348 }
349 349
350 bool SerializedScriptValueReaderForModules::readCryptoKey(v8::Local<v8::Value>* value) 350 bool SerializedScriptValueReaderForModules::readCryptoKey(v8::Local<v8::Value>* value)
351 { 351 {
352 uint32_t rawKeyType; 352 uint32_t rawKeyType;
353 if (!doReadUint32(&rawKeyType)) 353 if (!doReadUint32(&rawKeyType))
354 return false; 354 return false;
355 355
356 WebCryptoKeyAlgorithm algorithm; 356 WebCryptoKeyAlgorithm algorithm;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (position() + keyDataLength > length()) 393 if (position() + keyDataLength > length())
394 return false; 394 return false;
395 395
396 const uint8_t* keyData = allocate(keyDataLength); 396 const uint8_t* keyData = allocate(keyDataLength);
397 WebCryptoKey key = WebCryptoKey::createNull(); 397 WebCryptoKey key = WebCryptoKey::createNull();
398 if (!Platform::current()->crypto()->deserializeKeyForClone( 398 if (!Platform::current()->crypto()->deserializeKeyForClone(
399 algorithm, type, extractable, usages, keyData, keyDataLength, key)) { 399 algorithm, type, extractable, usages, keyData, keyDataLength, key)) {
400 return false; 400 return false;
401 } 401 }
402 402
403 *value = toV8(CryptoKey::create(key), scriptState()->context()->Global(), is olate()); 403 *value = toV8(CryptoKey::create(key), getScriptState()->context()->Global(), isolate());
404 return !value->IsEmpty(); 404 return !value->IsEmpty();
405 } 405 }
406 406
407 bool SerializedScriptValueReaderForModules::doReadHmacKey(WebCryptoKeyAlgorithm& algorithm, WebCryptoKeyType& type) 407 bool SerializedScriptValueReaderForModules::doReadHmacKey(WebCryptoKeyAlgorithm& algorithm, WebCryptoKeyType& type)
408 { 408 {
409 uint32_t lengthBytes; 409 uint32_t lengthBytes;
410 if (!doReadUint32(&lengthBytes)) 410 if (!doReadUint32(&lengthBytes))
411 return false; 411 return false;
412 WebCryptoAlgorithmId hash; 412 WebCryptoAlgorithmId hash;
413 if (!doReadAlgorithmId(hash)) 413 if (!doReadAlgorithmId(hash))
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 : ScriptValueDeserializer(reader, messagePorts, arrayBufferContents, imageBi tmapContents) 627 : ScriptValueDeserializer(reader, messagePorts, arrayBufferContents, imageBi tmapContents)
628 { 628 {
629 } 629 }
630 630
631 bool ScriptValueDeserializerForModules::read(v8::Local<v8::Value>* value) 631 bool ScriptValueDeserializerForModules::read(v8::Local<v8::Value>* value)
632 { 632 {
633 return toSerializedScriptValueReaderForModules(reader()).read(value, *this); 633 return toSerializedScriptValueReaderForModules(reader()).read(value, *this);
634 } 634 }
635 635
636 } // namespace blink 636 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698