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

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

Issue 184403002: Remove Script::SetData and the script_data parameter from Script::(Compile|New). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 9 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-debug.cc ('k') | 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 v8::String::NewExternal(isolate, resource); 216 v8::String::NewExternal(isolate, resource);
217 v8::Script::Compile(script_source, NULL, preparse); 217 v8::Script::Compile(script_source, NULL, preparse);
218 } 218 }
219 219
220 { 220 {
221 i::FLAG_lazy = false; 221 i::FLAG_lazy = false;
222 222
223 ScriptResource* resource = new ScriptResource(source, source_length); 223 ScriptResource* resource = new ScriptResource(source, source_length);
224 v8::Local<v8::String> script_source = 224 v8::Local<v8::String> script_source =
225 v8::String::NewExternal(isolate, resource); 225 v8::String::NewExternal(isolate, resource);
226 v8::Script::New(script_source, NULL, preparse, v8::Local<v8::String>()); 226 v8::Script::New(script_source, NULL, preparse);
227 } 227 }
228 delete preparse; 228 delete preparse;
229 i::FLAG_lazy = lazy_flag; 229 i::FLAG_lazy = lazy_flag;
230 230
231 // Syntax error. 231 // Syntax error.
232 v8::ScriptData* error_preparse = v8::ScriptData::PreCompile( 232 v8::ScriptData* error_preparse = v8::ScriptData::PreCompile(
233 v8::String::NewFromUtf8(isolate, 233 v8::String::NewFromUtf8(isolate,
234 error_source, 234 error_source,
235 v8::String::kNormalString, 235 v8::String::kNormalString,
236 error_source_length)); 236 error_source_length));
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 2195
2196 const char* statement_data[] = { 2196 const char* statement_data[] = {
2197 "new foo bar", 2197 "new foo bar",
2198 "new ) foo", 2198 "new ) foo",
2199 "new ++foo", 2199 "new ++foo",
2200 NULL 2200 NULL
2201 }; 2201 };
2202 2202
2203 RunParserSyncTest(context_data, statement_data, kError); 2203 RunParserSyncTest(context_data, statement_data, kError);
2204 } 2204 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698