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

Side by Side Diff: test/cctest/test-api.cc

Issue 9417002: Prefix usage of kExternalFloatArray and kExternalDoubleArray with v8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 12884 matching lines...) Expand 10 before | Expand all | Expand 10 after
12895 kElementCount); 12895 kElementCount);
12896 result = CompileRun(test_buf.start()); 12896 result = CompileRun(test_buf.start());
12897 CHECK_EQ(false, result->BooleanValue()); 12897 CHECK_EQ(false, result->BooleanValue());
12898 12898
12899 // Check other boundary conditions, values and operations. 12899 // Check other boundary conditions, values and operations.
12900 result = CompileRun("for (var i = 0; i < 8; i++) {" 12900 result = CompileRun("for (var i = 0; i < 8; i++) {"
12901 " ext_array[7] = undefined;" 12901 " ext_array[7] = undefined;"
12902 "}" 12902 "}"
12903 "ext_array[7];"); 12903 "ext_array[7];");
12904 CHECK_EQ(0, result->Int32Value()); 12904 CHECK_EQ(0, result->Int32Value());
12905 if (array_type == kExternalDoubleArray || 12905 if (array_type == v8::kExternalDoubleArray ||
12906 array_type == kExternalFloatArray) { 12906 array_type == v8::kExternalFloatArray) {
12907 CHECK_EQ( 12907 CHECK_EQ(
12908 static_cast<int>(0x80000000), 12908 static_cast<int>(0x80000000),
12909 static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number())); 12909 static_cast<int>(jsobj->GetElement(7)->ToObjectChecked()->Number()));
12910 } else { 12910 } else {
12911 CHECK_EQ(0, static_cast<int>( 12911 CHECK_EQ(0, static_cast<int>(
12912 jsobj->GetElement(7)->ToObjectChecked()->Number())); 12912 jsobj->GetElement(7)->ToObjectChecked()->Number()));
12913 } 12913 }
12914 12914
12915 result = CompileRun("for (var i = 0; i < 8; i++) {" 12915 result = CompileRun("for (var i = 0; i < 8; i++) {"
12916 " ext_array[6] = '2.3';" 12916 " ext_array[6] = '2.3';"
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
16090 CompileRun("throw 'exception';"); 16090 CompileRun("throw 'exception';");
16091 } 16091 }
16092 16092
16093 16093
16094 TEST(CallCompletedCallbackTwoExceptions) { 16094 TEST(CallCompletedCallbackTwoExceptions) {
16095 v8::HandleScope scope; 16095 v8::HandleScope scope;
16096 LocalContext env; 16096 LocalContext env;
16097 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); 16097 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException);
16098 CompileRun("throw 'first exception';"); 16098 CompileRun("throw 'first exception';");
16099 } 16099 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698