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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.h

Issue 2812833003: Revert of [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
index a1f218f6aba2e83c3e3ba912d4dc3200f6a72c2f..208eee281d1c38e4ee333baa39302ba6c0cfeee2 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
@@ -47,7 +47,6 @@
#include "bindings/core/v8/V8ThrowException.h"
#include "bindings/core/v8/V8ValueCache.h"
#include "core/CoreExport.h"
-#include "core/dom/NotShared.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/text/AtomicString.h"
#include "platform/wtf/text/StringView.h"
@@ -215,12 +214,6 @@
inline void V8SetReturnValue(const CallbackInfo& callback_info,
PassRefPtr<T> impl) {
V8SetReturnValue(callback_info, impl.Get());
-}
-
-template <typename CallbackInfo, typename T>
-inline void V8SetReturnValue(const CallbackInfo& callbackInfo,
- NotShared<T> notShared) {
- V8SetReturnValue(callbackInfo, notShared.View());
}
template <typename CallbackInfo>
@@ -341,13 +334,6 @@
V8SetReturnValue(callback_info, handle);
}
-template <typename CallbackInfo, typename T>
-inline void V8SetReturnValueFast(const CallbackInfo& callbackInfo,
- NotShared<T> notShared,
- const ScriptWrappable* wrappable) {
- V8SetReturnValueFast(callbackInfo, notShared.View(), wrappable);
-}
-
// Convert v8::String to a WTF::String. If the V8 string is not already
// an external string then it is transformed into an external string at this
// point to avoid repeated conversions.
@@ -1177,25 +1163,6 @@
CORE_EXPORT v8::Local<v8::Value> FromJSONString(v8::Isolate*,
const String& stringified_json,
ExceptionState&);
-
-// Ensure that a typed array value is not backed by a SharedArrayBuffer. If it
-// is, an exception will be thrown. The return value will use the NotShared
-// wrapper type.
-template <typename NotSharedType>
-NotSharedType ToNotShared(v8::Isolate* isolate,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
- using DOMTypedArray = typename NotSharedType::TypedArrayType;
- DOMTypedArray* dom_typed_array =
- V8TypeOf<DOMTypedArray>::Type::toImplWithTypeCheck(isolate, value);
- if (dom_typed_array && dom_typed_array->IsShared()) {
- exception_state.ThrowTypeError(
- "The provided ArrayBufferView value must not be shared.");
- return NotSharedType();
- }
- return NotSharedType(dom_typed_array);
-}
-
} // namespace blink
#endif // V8Binding_h
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ToV8.h ('k') | third_party/WebKit/Source/bindings/scripts/v8_attributes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698