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

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

Issue 1929293002: Revert of Remove more dead code after Object.observe removal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/regress/regress-1240.js » ('j') | 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 16123 matching lines...) Expand 10 before | Expand all | Expand 10 after
16134 " sum=ee_op_test_count_func(sum);" 16134 " sum=ee_op_test_count_func(sum);"
16135 "}" 16135 "}"
16136 "sum;"); 16136 "sum;");
16137 CHECK_EQ(16000000, result->Int32Value(context).FromJust()); 16137 CHECK_EQ(16000000, result->Int32Value(context).FromJust());
16138 16138
16139 result = CompileRun("ext_array[3] = 33;" 16139 result = CompileRun("ext_array[3] = 33;"
16140 "delete ext_array[3];" 16140 "delete ext_array[3];"
16141 "ext_array[3];"); 16141 "ext_array[3];");
16142 CHECK_EQ(33, result->Int32Value(context).FromJust()); 16142 CHECK_EQ(33, result->Int32Value(context).FromJust());
16143 16143
16144 result = CompileRun( 16144 result = CompileRun("ext_array[0] = 10; ext_array[1] = 11;"
16145 "ext_array[0] = 10; ext_array[1] = 11;" 16145 "ext_array[2] = 12; ext_array[3] = 13;"
16146 "ext_array[2] = 12; ext_array[3] = 13;" 16146 "ext_array.__defineGetter__('2',"
16147 "try { ext_array.__defineGetter__('2'," 16147 "function() { return 120; });"
16148 "function() { return 120; }); } catch(e) {};" 16148 "ext_array[2];");
16149 "ext_array[2];");
16150 CHECK_EQ(12, result->Int32Value(context).FromJust()); 16149 CHECK_EQ(12, result->Int32Value(context).FromJust());
16151 16150
16152 result = CompileRun("var js_array = new Array(40);" 16151 result = CompileRun("var js_array = new Array(40);"
16153 "js_array[0] = 77;" 16152 "js_array[0] = 77;"
16154 "js_array;"); 16153 "js_array;");
16155 CHECK_EQ(77, v8::Object::Cast(*result) 16154 CHECK_EQ(77, v8::Object::Cast(*result)
16156 ->Get(context, v8_str("0")) 16155 ->Get(context, v8_str("0"))
16157 .ToLocalChecked() 16156 .ToLocalChecked()
16158 ->Int32Value(context) 16157 ->Int32Value(context)
16159 .FromJust()); 16158 .FromJust());
(...skipping 8861 matching lines...) Expand 10 before | Expand all | Expand 10 after
25021 } 25020 }
25022 25021
25023 TEST(PrivateForApiIsNumber) { 25022 TEST(PrivateForApiIsNumber) {
25024 LocalContext context; 25023 LocalContext context;
25025 v8::Isolate* isolate = CcTest::isolate(); 25024 v8::Isolate* isolate = CcTest::isolate();
25026 v8::HandleScope scope(isolate); 25025 v8::HandleScope scope(isolate);
25027 25026
25028 // Shouldn't crash. 25027 // Shouldn't crash.
25029 v8::Private::ForApi(isolate, v8_str("42")); 25028 v8::Private::ForApi(isolate, v8_str("42"));
25030 } 25029 }
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/regress/regress-1240.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698