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

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

Issue 23799009: Always pass v8::Isolate to v8::Number::New() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp ('k') | Source/web/WebBindings.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 case WebGLGetInfo::kTypeBool: 127 case WebGLGetInfo::kTypeBool:
128 return v8::Boolean::New(info.getBool()); 128 return v8::Boolean::New(info.getBool());
129 case WebGLGetInfo::kTypeBoolArray: { 129 case WebGLGetInfo::kTypeBoolArray: {
130 const Vector<bool>& value = info.getBoolArray(); 130 const Vector<bool>& value = info.getBoolArray();
131 v8::Local<v8::Array> array = v8::Array::New(value.size()); 131 v8::Local<v8::Array> array = v8::Array::New(value.size());
132 for (size_t ii = 0; ii < value.size(); ++ii) 132 for (size_t ii = 0; ii < value.size(); ++ii)
133 array->Set(v8::Integer::New(ii, isolate), v8::Boolean::New(value[ii] )); 133 array->Set(v8::Integer::New(ii, isolate), v8::Boolean::New(value[ii] ));
134 return array; 134 return array;
135 } 135 }
136 case WebGLGetInfo::kTypeFloat: 136 case WebGLGetInfo::kTypeFloat:
137 return v8::Number::New(info.getFloat()); 137 return v8::Number::New(isolate, info.getFloat());
138 case WebGLGetInfo::kTypeInt: 138 case WebGLGetInfo::kTypeInt:
139 return v8::Integer::New(info.getInt(), isolate); 139 return v8::Integer::New(info.getInt(), isolate);
140 case WebGLGetInfo::kTypeNull: 140 case WebGLGetInfo::kTypeNull:
141 return v8::Null(isolate); 141 return v8::Null(isolate);
142 case WebGLGetInfo::kTypeString: 142 case WebGLGetInfo::kTypeString:
143 return v8String(info.getString(), isolate); 143 return v8String(info.getString(), isolate);
144 case WebGLGetInfo::kTypeUnsignedInt: 144 case WebGLGetInfo::kTypeUnsignedInt:
145 return v8::Integer::NewFromUnsigned(info.getUnsignedInt(), isolate); 145 return v8::Integer::NewFromUnsigned(info.getUnsignedInt(), isolate);
146 case WebGLGetInfo::kTypeWebGLBuffer: 146 case WebGLGetInfo::kTypeWebGLBuffer:
147 return toV8(info.getWebGLBuffer(), creationContext, isolate); 147 return toV8(info.getWebGLBuffer(), creationContext, isolate);
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 { 761 {
762 vertexAttribAndUniformHelperf(args, kVertexAttrib3v); 762 vertexAttribAndUniformHelperf(args, kVertexAttrib3v);
763 } 763 }
764 764
765 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall backInfo<v8::Value>& args) 765 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall backInfo<v8::Value>& args)
766 { 766 {
767 vertexAttribAndUniformHelperf(args, kVertexAttrib4v); 767 vertexAttribAndUniformHelperf(args, kVertexAttrib4v);
768 } 768 }
769 769
770 } // namespace WebCore 770 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp ('k') | Source/web/WebBindings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698