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

Unified Diff: src/factory.cc

Issue 261253005: Clean up debugger flags. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index f4d356b49c67a0b3e6b976406923eed3f4a9f609..f99ea9bcf5554496445ebff32be26ef3078f6759 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1395,7 +1395,8 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc,
Handle<Object> self_ref,
bool immovable,
bool crankshafted,
- int prologue_offset) {
+ int prologue_offset,
+ bool is_debug) {
Handle<ByteArray> reloc_info = NewByteArray(desc.reloc_size, TENURED);
Handle<ConstantPoolArray> constant_pool =
desc.origin->NewConstantPool(isolate());
@@ -1428,13 +1429,14 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc,
code->set_marked_for_deoptimization(false);
}
+ if (is_debug) {
+ ASSERT(code->kind() == Code::FUNCTION);
+ code->set_has_debug_break_slots(true);
+ }
+
desc.origin->PopulateConstantPool(*constant_pool);
code->set_constant_pool(*constant_pool);
- if (code->kind() == Code::FUNCTION) {
- code->set_has_debug_break_slots(isolate()->debugger()->IsDebuggerActive());
- }
-
// Allow self references to created code object by patching the handle to
// point to the newly allocated Code object.
if (!self_ref.is_null()) *(self_ref.location()) = *code;
« no previous file with comments | « src/factory.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698