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

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

Issue 2011553008: [Binding] [Refactoring] Move some create() from SerializedScriptValueFactory to SerializedScriptValu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 // Deserialize just the value data & blobInfo from the given IDBValue. 313 // Deserialize just the value data & blobInfo from the given IDBValue.
314 // Does not deserialize the key & keypath. 314 // Does not deserialize the key & keypath.
315 static v8::Local<v8::Value> deserializeIDBValueData(v8::Isolate* isolate, const IDBValue* value) 315 static v8::Local<v8::Value> deserializeIDBValueData(v8::Isolate* isolate, const IDBValue* value)
316 { 316 {
317 ASSERT(isolate->InContext()); 317 ASSERT(isolate->InContext());
318 if (!value || value->isNull()) 318 if (!value || value->isNull())
319 return v8::Null(isolate); 319 return v8::Null(isolate);
320 320
321 const SharedBuffer* valueData = value->data(); 321 const SharedBuffer* valueData = value->data();
322 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValueFactory ::instance().createFromWireBytes(valueData->data(), valueData->size()); 322 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::creat e(valueData->data(), valueData->size());
323 return serializedValue->deserialize(isolate, nullptr, value->blobInfo()); 323 return serializedValue->deserialize(isolate, nullptr, value->blobInfo());
324 } 324 }
325 325
326 // Deserialize the entire IDBValue (injecting key & keypath if present). 326 // Deserialize the entire IDBValue (injecting key & keypath if present).
327 static v8::Local<v8::Value> deserializeIDBValue(v8::Isolate* isolate, v8::Local< v8::Object> creationContext, const IDBValue* value) 327 static v8::Local<v8::Value> deserializeIDBValue(v8::Isolate* isolate, v8::Local< v8::Object> creationContext, const IDBValue* value)
328 { 328 {
329 ASSERT(isolate->InContext()); 329 ASSERT(isolate->InContext());
330 if (!value || value->isNull()) 330 if (!value || value->isNull())
331 return v8::Null(isolate); 331 return v8::Null(isolate);
332 332
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 return nullptr; 526 return nullptr;
527 v8::Local<v8::Object> global = context->Global(); 527 v8::Local<v8::Object> global = context->Global();
528 v8::Local<v8::Object> workletWrapper = V8WorkletGlobalScope::findInstanceInP rototypeChain(global, context->GetIsolate()); 528 v8::Local<v8::Object> workletWrapper = V8WorkletGlobalScope::findInstanceInP rototypeChain(global, context->GetIsolate());
529 if (!workletWrapper.IsEmpty()) 529 if (!workletWrapper.IsEmpty())
530 return V8WorkletGlobalScope::toImpl(workletWrapper); 530 return V8WorkletGlobalScope::toImpl(workletWrapper);
531 // FIXME: Is this line of code reachable? 531 // FIXME: Is this line of code reachable?
532 return nullptr; 532 return nullptr;
533 } 533 }
534 534
535 } // namespace blink 535 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698