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

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

Issue 23661004: add isolate parameter for Execution::Call (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase 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 | « test/cctest/test-compiler.cc ('k') | test/cctest/test-random.cc » ('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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 i, 1060 i,
1061 v8::Utils::OpenHandle(*v8::String::New(args[i])), 1061 v8::Utils::OpenHandle(*v8::String::New(args[i])),
1062 NONE, 1062 NONE,
1063 i::kNonStrictMode); 1063 i::kNonStrictMode);
1064 } 1064 }
1065 i::Handle<i::JSObject> builtins(isolate->js_builtins_object()); 1065 i::Handle<i::JSObject> builtins(isolate->js_builtins_object());
1066 i::Handle<i::Object> format_fun = 1066 i::Handle<i::Object> format_fun =
1067 i::GetProperty(builtins, "FormatMessage"); 1067 i::GetProperty(builtins, "FormatMessage");
1068 i::Handle<i::Object> arg_handles[] = { format, args_array }; 1068 i::Handle<i::Object> arg_handles[] = { format, args_array };
1069 bool has_exception = false; 1069 bool has_exception = false;
1070 i::Handle<i::Object> result = 1070 i::Handle<i::Object> result = i::Execution::Call(
1071 i::Execution::Call(format_fun, builtins, 2, arg_handles, &has_exception); 1071 isolate, format_fun, builtins, 2, arg_handles, &has_exception);
1072 CHECK(!has_exception); 1072 CHECK(!has_exception);
1073 CHECK(result->IsString()); 1073 CHECK(result->IsString());
1074 for (int i = 0; i < args.length(); i++) { 1074 for (int i = 0; i < args.length(); i++) {
1075 i::DeleteArray(args[i]); 1075 i::DeleteArray(args[i]);
1076 } 1076 }
1077 i::DeleteArray(args.start()); 1077 i::DeleteArray(args.start());
1078 i::DeleteArray(message); 1078 i::DeleteArray(message);
1079 return i::Handle<i::String>::cast(result); 1079 return i::Handle<i::String>::cast(result);
1080 } 1080 }
1081 1081
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 " b = function() { \n" 1318 " b = function() { \n"
1319 " 01; \n" 1319 " 01; \n"
1320 " }; \n" 1320 " }; \n"
1321 "}; \n"; 1321 "}; \n";
1322 v8::Script::Compile(v8::String::New(script)); 1322 v8::Script::Compile(v8::String::New(script));
1323 CHECK(try_catch.HasCaught()); 1323 CHECK(try_catch.HasCaught());
1324 v8::String::Utf8Value exception(try_catch.Exception()); 1324 v8::String::Utf8Value exception(try_catch.Exception());
1325 CHECK_EQ("SyntaxError: Octal literals are not allowed in strict mode.", 1325 CHECK_EQ("SyntaxError: Octal literals are not allowed in strict mode.",
1326 *exception); 1326 *exception);
1327 } 1327 }
OLDNEW
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | test/cctest/test-random.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698