| OLD | NEW |
| 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 "config.h" | 5 #include "config.h" |
| 6 #include "bindings/modules/v8/WebGLAny.h" | 6 #include "bindings/modules/v8/WebGLAny.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ToV8.h" | 8 #include "bindings/core/v8/ToV8.h" |
| 9 #include "wtf/text/WTFString.h" | 9 #include "wtf/text/WTFString.h" |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 ScriptValue WebGLAny(ScriptState* scriptState, unsigned value) | 33 ScriptValue WebGLAny(ScriptState* scriptState, unsigned value) |
| 34 { | 34 { |
| 35 return ScriptValue(scriptState, v8::Integer::NewFromUnsigned(scriptState->is
olate(), static_cast<unsigned>(value))); | 35 return ScriptValue(scriptState, v8::Integer::NewFromUnsigned(scriptState->is
olate(), static_cast<unsigned>(value))); |
| 36 } | 36 } |
| 37 | 37 |
| 38 ScriptValue WebGLAny(ScriptState* scriptState, int64_t value) | 38 ScriptValue WebGLAny(ScriptState* scriptState, int64_t value) |
| 39 { | 39 { |
| 40 return ScriptValue(scriptState, v8::Number::New(scriptState->isolate(), stat
ic_cast<double>(value))); | 40 return ScriptValue(scriptState, v8::Number::New(scriptState->isolate(), stat
ic_cast<double>(value))); |
| 41 } | 41 } |
| 42 | 42 |
| 43 ScriptValue WebGLAny(ScriptState* scriptState, uint64_t value) |
| 44 { |
| 45 return ScriptValue(scriptState, v8::Number::New(scriptState->isolate(), stat
ic_cast<double>(value))); |
| 46 } |
| 47 |
| 43 ScriptValue WebGLAny(ScriptState* scriptState, float value) | 48 ScriptValue WebGLAny(ScriptState* scriptState, float value) |
| 44 { | 49 { |
| 45 return ScriptValue(scriptState, v8::Number::New(scriptState->isolate(), valu
e)); | 50 return ScriptValue(scriptState, v8::Number::New(scriptState->isolate(), valu
e)); |
| 46 } | 51 } |
| 47 | 52 |
| 48 ScriptValue WebGLAny(ScriptState* scriptState, String value) | 53 ScriptValue WebGLAny(ScriptState* scriptState, String value) |
| 49 { | 54 { |
| 50 return ScriptValue(scriptState, v8String(scriptState->isolate(), value)); | 55 return ScriptValue(scriptState, v8String(scriptState->isolate(), value)); |
| 51 } | 56 } |
| 52 | 57 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 69 { | 74 { |
| 70 return ScriptValue(scriptState, toV8(value, scriptState->context()->Global()
, scriptState->isolate())); | 75 return ScriptValue(scriptState, toV8(value, scriptState->context()->Global()
, scriptState->isolate())); |
| 71 } | 76 } |
| 72 | 77 |
| 73 ScriptValue WebGLAny(ScriptState* scriptState, PassRefPtr<DOMUint32Array> value) | 78 ScriptValue WebGLAny(ScriptState* scriptState, PassRefPtr<DOMUint32Array> value) |
| 74 { | 79 { |
| 75 return ScriptValue(scriptState, toV8(value, scriptState->context()->Global()
, scriptState->isolate())); | 80 return ScriptValue(scriptState, toV8(value, scriptState->context()->Global()
, scriptState->isolate())); |
| 76 } | 81 } |
| 77 | 82 |
| 78 } // namespace blink | 83 } // namespace blink |
| OLD | NEW |