OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 void V8WebGLRenderingContext::getExtensionMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 352 void V8WebGLRenderingContext::getExtensionMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
353 { | 353 { |
354 ExceptionState exceptionState(ExceptionState::ExecutionContext, "getExtensio
n", "WebGLRenderingContext", info.Holder(), info.GetIsolate()); | 354 ExceptionState exceptionState(ExceptionState::ExecutionContext, "getExtensio
n", "WebGLRenderingContext", info.Holder(), info.GetIsolate()); |
355 WebGLRenderingContext* impl = V8WebGLRenderingContext::toNative(info.Holder(
)); | 355 WebGLRenderingContext* impl = V8WebGLRenderingContext::toNative(info.Holder(
)); |
356 if (info.Length() < 1) { | 356 if (info.Length() < 1) { |
357 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 357 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
358 exceptionState.throwIfNeeded(); | 358 exceptionState.throwIfNeeded(); |
359 return; | 359 return; |
360 } | 360 } |
361 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]); | 361 V8STRINGRESOURCE_PREPARE_VOID(V8StringResource<>, name, info[0]); |
362 RefPtr<WebGLExtension> extension(impl->getExtension(name)); | 362 RefPtr<WebGLExtension> extension(impl->getExtension(name)); |
363 v8SetReturnValue(info, toV8Object(extension.get(), info.Holder(), info.GetIs
olate())); | 363 v8SetReturnValue(info, toV8Object(extension.get(), info.Holder(), info.GetIs
olate())); |
364 } | 364 } |
365 | 365 |
366 void V8WebGLRenderingContext::getFramebufferAttachmentParameterMethodCustom(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 366 void V8WebGLRenderingContext::getFramebufferAttachmentParameterMethodCustom(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
367 { | 367 { |
368 ExceptionState exceptionState(ExceptionState::ExecutionContext, "getFramebuf
ferAttachmentParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate
()); | 368 ExceptionState exceptionState(ExceptionState::ExecutionContext, "getFramebuf
ferAttachmentParameter", "WebGLRenderingContext", info.Holder(), info.GetIsolate
()); |
369 if (info.Length() != 3) { | 369 if (info.Length() != 3) { |
370 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); | 370 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i
nfo.Length())); |
371 exceptionState.throwIfNeeded(); | 371 exceptionState.throwIfNeeded(); |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 vertexAttribAndUniformHelperf(info, kVertexAttrib3v, exceptionState); | 842 vertexAttribAndUniformHelperf(info, kVertexAttrib3v, exceptionState); |
843 } | 843 } |
844 | 844 |
845 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall
backInfo<v8::Value>& info) | 845 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall
backInfo<v8::Value>& info) |
846 { | 846 { |
847 ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttri
b4fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate()); | 847 ExceptionState exceptionState(ExceptionState::ExecutionContext, "vertexAttri
b4fv", "WebGLRenderingContext", info.Holder(), info.GetIsolate()); |
848 vertexAttribAndUniformHelperf(info, kVertexAttrib4v, exceptionState); | 848 vertexAttribAndUniformHelperf(info, kVertexAttrib4v, exceptionState); |
849 } | 849 } |
850 | 850 |
851 } // namespace WebCore | 851 } // namespace WebCore |
OLD | NEW |