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

Side by Side Diff: Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp

Issue 15876011: Make WebGL extensions get lost when context is lost. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 344 }
345 345
346 void V8WebGLRenderingContext::getExtensionMethodCustom(const v8::FunctionCallbac kInfo<v8::Value>& args) 346 void V8WebGLRenderingContext::getExtensionMethodCustom(const v8::FunctionCallbac kInfo<v8::Value>& args)
347 { 347 {
348 WebGLRenderingContext* imp = V8WebGLRenderingContext::toNative(args.Holder() ); 348 WebGLRenderingContext* imp = V8WebGLRenderingContext::toNative(args.Holder() );
349 if (args.Length() < 1) { 349 if (args.Length() < 1) {
350 throwNotEnoughArgumentsError(args.GetIsolate()); 350 throwNotEnoughArgumentsError(args.GetIsolate());
351 return; 351 return;
352 } 352 }
353 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, args[0]); 353 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, args[0]);
354 WebGLExtension* extension = imp->getExtension(name); 354 RefPtr<WebGLExtension> extension(imp->getExtension(name));
355 v8SetReturnValue(args, toV8Object(extension, args.Holder(), args.GetIsolate( ))); 355 v8SetReturnValue(args, toV8Object(extension.get(), args.Holder(), args.GetIs olate()));
Ken Russell (switch to Gerrit) 2013/06/11 21:50:54 This could possibly use extension.release() since
greggman 2013/06/11 21:55:21 I copied this from getAttachedShadersMethodCustom.
Ken Russell (switch to Gerrit) 2013/06/11 22:07:31 getAttachedShadersMethodCustom could be changed to
356 } 356 }
357 357
358 void V8WebGLRenderingContext::getFramebufferAttachmentParameterMethodCustom(cons t v8::FunctionCallbackInfo<v8::Value>& args) 358 void V8WebGLRenderingContext::getFramebufferAttachmentParameterMethodCustom(cons t v8::FunctionCallbackInfo<v8::Value>& args)
359 { 359 {
360 if (args.Length() != 3) { 360 if (args.Length() != 3) {
361 throwNotEnoughArgumentsError(args.GetIsolate()); 361 throwNotEnoughArgumentsError(args.GetIsolate());
362 return; 362 return;
363 } 363 }
364 364
365 ExceptionCode ec = 0; 365 ExceptionCode ec = 0;
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 { 823 {
824 vertexAttribAndUniformHelperf(args, kVertexAttrib3v); 824 vertexAttribAndUniformHelperf(args, kVertexAttrib3v);
825 } 825 }
826 826
827 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall backInfo<v8::Value>& args) 827 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall backInfo<v8::Value>& args)
828 { 828 {
829 vertexAttribAndUniformHelperf(args, kVertexAttrib4v); 829 vertexAttribAndUniformHelperf(args, kVertexAttrib4v);
830 } 830 }
831 831
832 } // namespace WebCore 832 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/canvas/EXTFragDepth.h » ('j') | Source/core/html/canvas/WebGLLoseContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698