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

Side by Side Diff: src/bootstrapper.cc

Issue 12702008: Fix handling of context creation failure since r13978. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 v->Synchronize(VisitorSynchronization::kExtensions); 296 v->Synchronize(VisitorSynchronization::kExtensions);
297 } 297 }
298 298
299 299
300 Handle<Context> Bootstrapper::CreateEnvironment( 300 Handle<Context> Bootstrapper::CreateEnvironment(
301 Handle<Object> global_object, 301 Handle<Object> global_object,
302 v8::Handle<v8::ObjectTemplate> global_template, 302 v8::Handle<v8::ObjectTemplate> global_template,
303 v8::ExtensionConfiguration* extensions) { 303 v8::ExtensionConfiguration* extensions) {
304 HandleScope scope(isolate_); 304 HandleScope scope(isolate_);
305 Genesis genesis(isolate_, global_object, global_template, extensions); 305 Genesis genesis(isolate_, global_object, global_template, extensions);
306 Handle<Object> context(isolate_->global_handles()->Create(*genesis.result())); 306 if (!genesis.result().is_null()) {
307 Handle<Context> env = Handle<Context>::cast(context); 307 Handle<Object> ctx(isolate_->global_handles()->Create(*genesis.result()));
308 if (!env.is_null()) { 308 Handle<Context> env = Handle<Context>::cast(ctx);
309 if (InstallExtensions(env, extensions)) { 309 if (InstallExtensions(env, extensions)) {
310 return env; 310 return env;
311 } 311 }
312 } 312 }
313 return Handle<Context>(); 313 return Handle<Context>();
314 } 314 }
315 315
316 316
317 static void SetObjectPrototype(Handle<JSObject> object, Handle<Object> proto) { 317 static void SetObjectPrototype(Handle<JSObject> object, Handle<Object> proto) {
318 // object.__proto__ = proto; 318 // object.__proto__ = proto;
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 return from + sizeof(NestingCounterType); 2488 return from + sizeof(NestingCounterType);
2489 } 2489 }
2490 2490
2491 2491
2492 // Called when the top-level V8 mutex is destroyed. 2492 // Called when the top-level V8 mutex is destroyed.
2493 void Bootstrapper::FreeThreadResources() { 2493 void Bootstrapper::FreeThreadResources() {
2494 ASSERT(!IsActive()); 2494 ASSERT(!IsActive());
2495 } 2495 }
2496 2496
2497 } } // namespace v8::internal 2497 } } // namespace v8::internal
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