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

Side by Side Diff: src/d8.cc

Issue 677153004: New test variant for --cache=parse (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « no previous file | tools/run-tests.py » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (name->IsString()) { 188 if (name->IsString()) {
189 Local<String> name_string = name->ToString(); 189 Local<String> name_string = name->ToString();
190 name_length = name_string->Length(); 190 name_length = name_string->Length();
191 name_buffer = new uint16_t[name_length]; 191 name_buffer = new uint16_t[name_length];
192 name_string->Write(name_buffer, 0, name_length); 192 name_string->Write(name_buffer, 0, name_length);
193 } 193 }
194 Isolate* temp_isolate = Isolate::New(); 194 Isolate* temp_isolate = Isolate::New();
195 ScriptCompiler::CachedData* result = NULL; 195 ScriptCompiler::CachedData* result = NULL;
196 { 196 {
197 Isolate::Scope isolate_scope(temp_isolate); 197 Isolate::Scope isolate_scope(temp_isolate);
198 TryCatch try_catch; // Swallow syntax errors
198 HandleScope handle_scope(temp_isolate); 199 HandleScope handle_scope(temp_isolate);
199 Context::Scope context_scope(Context::New(temp_isolate)); 200 Context::Scope context_scope(Context::New(temp_isolate));
200 Local<String> source_copy = v8::String::NewFromTwoByte( 201 Local<String> source_copy = v8::String::NewFromTwoByte(
201 temp_isolate, source_buffer, v8::String::kNormalString, source_length); 202 temp_isolate, source_buffer, v8::String::kNormalString, source_length);
202 Local<Value> name_copy; 203 Local<Value> name_copy;
203 if (name_buffer) { 204 if (name_buffer) {
204 name_copy = v8::String::NewFromTwoByte( 205 name_copy = v8::String::NewFromTwoByte(
205 temp_isolate, name_buffer, v8::String::kNormalString, name_length); 206 temp_isolate, name_buffer, v8::String::kNormalString, name_length);
206 } else { 207 } else {
207 name_copy = v8::Undefined(temp_isolate); 208 name_copy = v8::Undefined(temp_isolate);
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 } 1766 }
1766 1767
1767 } // namespace v8 1768 } // namespace v8
1768 1769
1769 1770
1770 #ifndef GOOGLE3 1771 #ifndef GOOGLE3
1771 int main(int argc, char* argv[]) { 1772 int main(int argc, char* argv[]) {
1772 return v8::Shell::Main(argc, argv); 1773 return v8::Shell::Main(argc, argv);
1773 } 1774 }
1774 #endif 1775 #endif
OLDNEW
« no previous file with comments | « no previous file | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698