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

Side by Side Diff: src/bootstrapper.cc

Issue 16578008: Improved function entry hook coverage (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@post_fix
Patch Set: Remove reliance on space->Contains check, which is only valid for V8-allocated memory. Go to unsign… Created 7 years, 6 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
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 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 // Before creating the roots we must save the context and restore it 2567 // Before creating the roots we must save the context and restore it
2568 // on all function exits. 2568 // on all function exits.
2569 SaveContext saved_context(isolate); 2569 SaveContext saved_context(isolate);
2570 2570
2571 // During genesis, the boilerplate for stack overflow won't work until the 2571 // During genesis, the boilerplate for stack overflow won't work until the
2572 // environment has been at least partially initialized. Add a stack check 2572 // environment has been at least partially initialized. Add a stack check
2573 // before entering JS code to catch overflow early. 2573 // before entering JS code to catch overflow early.
2574 StackLimitCheck check(isolate); 2574 StackLimitCheck check(isolate);
2575 if (check.HasOverflowed()) return; 2575 if (check.HasOverflowed()) return;
2576 2576
2577 native_context_ = Snapshot::NewContextFromSnapshot(); 2577 // We can only de-serialize a context if the isolate was initialized from
2578 // a snapshot. Otherwise we have to build the context from scratch.
2579 if (isolate->initialized_from_snapshot())
danno 2013/06/25 18:40:35 V8 style nit: then/else blocks wrapped in {}
Sigurður Ásgeirsson 2013/06/27 13:06:40 Done.
2580 native_context_ = Snapshot::NewContextFromSnapshot();
2581 else
2582 native_context_ = Handle<Context>();
2583
2578 if (!native_context().is_null()) { 2584 if (!native_context().is_null()) {
2579 AddToWeakNativeContextList(*native_context()); 2585 AddToWeakNativeContextList(*native_context());
2580 isolate->set_context(*native_context()); 2586 isolate->set_context(*native_context());
2581 isolate->counters()->contexts_created_by_snapshot()->Increment(); 2587 isolate->counters()->contexts_created_by_snapshot()->Increment();
2582 Handle<GlobalObject> inner_global; 2588 Handle<GlobalObject> inner_global;
2583 Handle<JSGlobalProxy> global_proxy = 2589 Handle<JSGlobalProxy> global_proxy =
2584 CreateNewGlobals(global_template, 2590 CreateNewGlobals(global_template,
2585 global_object, 2591 global_object,
2586 &inner_global); 2592 &inner_global);
2587 2593
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 return from + sizeof(NestingCounterType); 2645 return from + sizeof(NestingCounterType);
2640 } 2646 }
2641 2647
2642 2648
2643 // Called when the top-level V8 mutex is destroyed. 2649 // Called when the top-level V8 mutex is destroyed.
2644 void Bootstrapper::FreeThreadResources() { 2650 void Bootstrapper::FreeThreadResources() {
2645 ASSERT(!IsActive()); 2651 ASSERT(!IsActive());
2646 } 2652 }
2647 2653
2648 } } // namespace v8::internal 2654 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/code-stubs.h » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698