| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #include "bindings/core/v8/SerializedScriptValue.h" | 28 #include "bindings/core/v8/SerializedScriptValue.h" |
| 29 #include "bindings/core/v8/SerializedScriptValueFactory.h" | 29 #include "bindings/core/v8/SerializedScriptValueFactory.h" |
| 30 #include "bindings/core/v8/V8ArrayBuffer.h" | 30 #include "bindings/core/v8/V8ArrayBuffer.h" |
| 31 #include "bindings/core/v8/V8ArrayBufferView.h" | 31 #include "bindings/core/v8/V8ArrayBufferView.h" |
| 32 #include "bindings/core/v8/V8Binding.h" | 32 #include "bindings/core/v8/V8Binding.h" |
| 33 #include "bindings/core/v8/V8Blob.h" | 33 #include "bindings/core/v8/V8Blob.h" |
| 34 #include "bindings/core/v8/V8DOMStringList.h" | 34 #include "bindings/core/v8/V8DOMStringList.h" |
| 35 #include "bindings/core/v8/V8File.h" | 35 #include "bindings/core/v8/V8File.h" |
| 36 #include "bindings/core/v8/V8Uint8Array.h" | 36 #include "bindings/core/v8/V8Uint8Array.h" |
| 37 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" |
| 37 #include "bindings/modules/v8/ToV8ForModules.h" | 38 #include "bindings/modules/v8/ToV8ForModules.h" |
| 38 #include "bindings/modules/v8/V8IDBCursor.h" | 39 #include "bindings/modules/v8/V8IDBCursor.h" |
| 39 #include "bindings/modules/v8/V8IDBCursorWithValue.h" | 40 #include "bindings/modules/v8/V8IDBCursorWithValue.h" |
| 40 #include "bindings/modules/v8/V8IDBDatabase.h" | 41 #include "bindings/modules/v8/V8IDBDatabase.h" |
| 41 #include "bindings/modules/v8/V8IDBIndex.h" | 42 #include "bindings/modules/v8/V8IDBIndex.h" |
| 42 #include "bindings/modules/v8/V8IDBKeyRange.h" | 43 #include "bindings/modules/v8/V8IDBKeyRange.h" |
| 43 #include "bindings/modules/v8/V8IDBObjectStore.h" | 44 #include "bindings/modules/v8/V8IDBObjectStore.h" |
| 45 #include "bindings/modules/v8/V8WorkletGlobalScope.h" |
| 44 #include "core/dom/DOMArrayBuffer.h" | 46 #include "core/dom/DOMArrayBuffer.h" |
| 45 #include "core/dom/DOMArrayBufferView.h" | 47 #include "core/dom/DOMArrayBufferView.h" |
| 48 #include "core/dom/ExecutionContext.h" |
| 46 #include "modules/indexeddb/IDBKey.h" | 49 #include "modules/indexeddb/IDBKey.h" |
| 47 #include "modules/indexeddb/IDBKeyPath.h" | 50 #include "modules/indexeddb/IDBKeyPath.h" |
| 48 #include "modules/indexeddb/IDBKeyRange.h" | 51 #include "modules/indexeddb/IDBKeyRange.h" |
| 49 #include "modules/indexeddb/IDBTracing.h" | 52 #include "modules/indexeddb/IDBTracing.h" |
| 50 #include "modules/indexeddb/IDBValue.h" | 53 #include "modules/indexeddb/IDBValue.h" |
| 54 #include "modules/worklet/WorkletGlobalScope.h" |
| 51 #include "platform/RuntimeEnabledFeatures.h" | 55 #include "platform/RuntimeEnabledFeatures.h" |
| 52 #include "platform/SharedBuffer.h" | 56 #include "platform/SharedBuffer.h" |
| 53 #include "wtf/MathExtras.h" | 57 #include "wtf/MathExtras.h" |
| 54 #include "wtf/Vector.h" | 58 #include "wtf/Vector.h" |
| 55 | 59 |
| 56 namespace blink { | 60 namespace blink { |
| 57 | 61 |
| 58 static v8::Local<v8::Value> deserializeIDBValueData(v8::Isolate*, const IDBValue
*); | 62 static v8::Local<v8::Value> deserializeIDBValueData(v8::Isolate*, const IDBValue
*); |
| 59 static v8::Local<v8::Value> deserializeIDBValue(v8::Isolate*, v8::Local<v8::Obje
ct> creationContext, const IDBValue*); | 63 static v8::Local<v8::Value> deserializeIDBValue(v8::Isolate*, v8::Local<v8::Obje
ct> creationContext, const IDBValue*); |
| 60 static v8::Local<v8::Value> deserializeIDBValueArray(v8::Isolate*, v8::Local<v8:
:Object> creationContext, const Vector<RefPtr<IDBValue>>*); | 64 static v8::Local<v8::Value> deserializeIDBValueArray(v8::Isolate*, v8::Local<v8:
:Object> creationContext, const Vector<RefPtr<IDBValue>>*); |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 IDBKey* expectedKey = createIDBKeyFromValueAndKeyPath(isolate, scriptValue.v
8Value(), value->keyPath(), exceptionState, allowExperimentalTypes); | 513 IDBKey* expectedKey = createIDBKeyFromValueAndKeyPath(isolate, scriptValue.v
8Value(), value->keyPath(), exceptionState, allowExperimentalTypes); |
| 510 ASSERT(!exceptionState.hadException()); | 514 ASSERT(!exceptionState.hadException()); |
| 511 if (expectedKey && expectedKey->isEqual(value->primaryKey())) | 515 if (expectedKey && expectedKey->isEqual(value->primaryKey())) |
| 512 return; | 516 return; |
| 513 | 517 |
| 514 bool injected = injectV8KeyIntoV8Value(isolate, keyValue.v8Value(), scriptVa
lue.v8Value(), value->keyPath()); | 518 bool injected = injectV8KeyIntoV8Value(isolate, keyValue.v8Value(), scriptVa
lue.v8Value(), value->keyPath()); |
| 515 ASSERT_UNUSED(injected, injected); | 519 ASSERT_UNUSED(injected, injected); |
| 516 } | 520 } |
| 517 #endif | 521 #endif |
| 518 | 522 |
| 523 ExecutionContext* toExecutionContextForModules(v8::Local<v8::Context> context) |
| 524 { |
| 525 if (context.IsEmpty()) |
| 526 return nullptr; |
| 527 v8::Local<v8::Object> global = context->Global(); |
| 528 v8::Local<v8::Object> workletWrapper = V8WorkletGlobalScope::findInstanceInP
rototypeChain(global, context->GetIsolate()); |
| 529 if (!workletWrapper.IsEmpty()) |
| 530 return V8WorkletGlobalScope::toImpl(workletWrapper); |
| 531 // FIXME: Is this line of code reachable? |
| 532 return nullptr; |
| 533 } |
| 534 |
| 519 } // namespace blink | 535 } // namespace blink |
| OLD | NEW |