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

Side by Side Diff: Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp

Issue 1097773004: Sharing of SharedArrayBuffer via PostMessage transfer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add worker global interface listing expectations Created 5 years, 5 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 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8Uint8ClampedArray.h" 8 #include "V8Uint8ClampedArray.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/V8ArrayBuffer.h" 11 #include "bindings/core/v8/V8ArrayBuffer.h"
12 #include "bindings/core/v8/V8DOMConfiguration.h" 12 #include "bindings/core/v8/V8DOMConfiguration.h"
13 #include "bindings/core/v8/V8ObjectConstructor.h" 13 #include "bindings/core/v8/V8ObjectConstructor.h"
14 #include "bindings/core/v8/V8SharedArrayBuffer.h"
14 #include "core/dom/ContextFeatures.h" 15 #include "core/dom/ContextFeatures.h"
15 #include "core/dom/Document.h" 16 #include "core/dom/Document.h"
16 #include "platform/RuntimeEnabledFeatures.h" 17 #include "platform/RuntimeEnabledFeatures.h"
17 #include "platform/TraceEvent.h" 18 #include "platform/TraceEvent.h"
18 #include "wtf/GetPtr.h" 19 #include "wtf/GetPtr.h"
19 #include "wtf/RefPtr.h" 20 #include "wtf/RefPtr.h"
20 21
21 namespace blink { 22 namespace blink {
22 23
23 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial 24 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial
(...skipping 17 matching lines...) Expand all
41 } 42 }
42 43
43 TestUint8ClampedArray* V8Uint8ClampedArray::toImpl(v8::Local<v8::Object> object) 44 TestUint8ClampedArray* V8Uint8ClampedArray::toImpl(v8::Local<v8::Object> object)
44 { 45 {
45 ASSERT(object->IsUint8ClampedArray()); 46 ASSERT(object->IsUint8ClampedArray());
46 ScriptWrappable* scriptWrappable = toScriptWrappable(object); 47 ScriptWrappable* scriptWrappable = toScriptWrappable(object);
47 if (scriptWrappable) 48 if (scriptWrappable)
48 return scriptWrappable->toImpl<TestUint8ClampedArray>(); 49 return scriptWrappable->toImpl<TestUint8ClampedArray>();
49 50
50 v8::Local<v8::Uint8ClampedArray> v8View = object.As<v8::Uint8ClampedArray>() ; 51 v8::Local<v8::Uint8ClampedArray> v8View = object.As<v8::Uint8ClampedArray>() ;
51 RefPtr<TestUint8ClampedArray> typedArray = TestUint8ClampedArray::create(V8A rrayBuffer::toImpl(v8View->Buffer()), v8View->ByteOffset(), v8View->Length()); 52 v8::Local<v8::Object> arrayBuffer = v8View->Buffer();
53 RefPtr<TestUint8ClampedArray> typedArray;
54 if (arrayBuffer->IsArrayBuffer()) {
55 typedArray = TestUint8ClampedArray::create(V8ArrayBuffer::toImpl(arrayBu ffer), v8View->ByteOffset(), v8View->Length());
56 } else if (arrayBuffer->IsSharedArrayBuffer()) {
57 typedArray = TestUint8ClampedArray::create(V8SharedArrayBuffer::toImpl(a rrayBuffer), v8View->ByteOffset(), v8View->Length());
58 } else {
59 ASSERT_NOT_REACHED();
60 }
52 typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrap perTypeInfo(), object); 61 typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrap perTypeInfo(), object);
53 62
54 return typedArray->toImpl<TestUint8ClampedArray>(); 63 return typedArray->toImpl<TestUint8ClampedArray>();
55 } 64 }
56 65
57 TestUint8ClampedArray* V8Uint8ClampedArray::toImplWithTypeCheck(v8::Isolate* iso late, v8::Local<v8::Value> value) 66 TestUint8ClampedArray* V8Uint8ClampedArray::toImplWithTypeCheck(v8::Isolate* iso late, v8::Local<v8::Value> value)
58 { 67 {
59 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 68 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
60 } 69 }
61 70
62 void V8Uint8ClampedArray::refObject(ScriptWrappable* scriptWrappable) 71 void V8Uint8ClampedArray::refObject(ScriptWrappable* scriptWrappable)
63 { 72 {
64 scriptWrappable->toImpl<TestUint8ClampedArray>()->ref(); 73 scriptWrappable->toImpl<TestUint8ClampedArray>()->ref();
65 } 74 }
66 75
67 void V8Uint8ClampedArray::derefObject(ScriptWrappable* scriptWrappable) 76 void V8Uint8ClampedArray::derefObject(ScriptWrappable* scriptWrappable)
68 { 77 {
69 scriptWrappable->toImpl<TestUint8ClampedArray>()->deref(); 78 scriptWrappable->toImpl<TestUint8ClampedArray>()->deref();
70 } 79 }
71 80
72 } // namespace blink 81 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698