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

Side by Side Diff: src/debug.cc

Issue 390833003: Remove PropertyAttributes from SetProperty (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « src/api.cc ('k') | src/factory.cc » ('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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 isolate_->set_context(*context); 819 isolate_->set_context(*context);
820 820
821 // Expose the builtins object in the debugger context. 821 // Expose the builtins object in the debugger context.
822 Handle<String> key = isolate_->factory()->InternalizeOneByteString( 822 Handle<String> key = isolate_->factory()->InternalizeOneByteString(
823 STATIC_ASCII_VECTOR("builtins")); 823 STATIC_ASCII_VECTOR("builtins"));
824 Handle<GlobalObject> global = 824 Handle<GlobalObject> global =
825 Handle<GlobalObject>(context->global_object(), isolate_); 825 Handle<GlobalObject>(context->global_object(), isolate_);
826 Handle<JSBuiltinsObject> builtin = 826 Handle<JSBuiltinsObject> builtin =
827 Handle<JSBuiltinsObject>(global->builtins(), isolate_); 827 Handle<JSBuiltinsObject>(global->builtins(), isolate_);
828 RETURN_ON_EXCEPTION_VALUE( 828 RETURN_ON_EXCEPTION_VALUE(
829 isolate_, 829 isolate_, JSReceiver::SetProperty(global, key, builtin, SLOPPY), false);
830 JSReceiver::SetProperty(global, key, builtin, NONE, SLOPPY),
831 false);
832 830
833 // Compile the JavaScript for the debugger in the debugger context. 831 // Compile the JavaScript for the debugger in the debugger context.
834 bool caught_exception = 832 bool caught_exception =
835 !CompileDebuggerScript(isolate_, Natives::GetIndex("mirror")) || 833 !CompileDebuggerScript(isolate_, Natives::GetIndex("mirror")) ||
836 !CompileDebuggerScript(isolate_, Natives::GetIndex("debug")); 834 !CompileDebuggerScript(isolate_, Natives::GetIndex("debug"));
837 835
838 if (FLAG_enable_liveedit) { 836 if (FLAG_enable_liveedit) {
839 caught_exception = caught_exception || 837 caught_exception = caught_exception ||
840 !CompileDebuggerScript(isolate_, Natives::GetIndex("liveedit")); 838 !CompileDebuggerScript(isolate_, Natives::GetIndex("liveedit"));
841 } 839 }
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2447 2445
2448 void Debug::ClearMirrorCache() { 2446 void Debug::ClearMirrorCache() {
2449 PostponeInterruptsScope postpone(isolate_); 2447 PostponeInterruptsScope postpone(isolate_);
2450 HandleScope scope(isolate_); 2448 HandleScope scope(isolate_);
2451 AssertDebugContext(); 2449 AssertDebugContext();
2452 Factory* factory = isolate_->factory(); 2450 Factory* factory = isolate_->factory();
2453 Handle<GlobalObject> global(isolate_->global_object()); 2451 Handle<GlobalObject> global(isolate_->global_object());
2454 JSObject::SetProperty(global, 2452 JSObject::SetProperty(global,
2455 factory->NewStringFromAsciiChecked("next_handle_"), 2453 factory->NewStringFromAsciiChecked("next_handle_"),
2456 handle(Smi::FromInt(0), isolate_), 2454 handle(Smi::FromInt(0), isolate_),
2457 NONE,
2458 SLOPPY).Check(); 2455 SLOPPY).Check();
2459 JSObject::SetProperty(global, 2456 JSObject::SetProperty(global,
2460 factory->NewStringFromAsciiChecked("mirror_cache_"), 2457 factory->NewStringFromAsciiChecked("mirror_cache_"),
2461 factory->NewJSArray(0, FAST_ELEMENTS), 2458 factory->NewJSArray(0, FAST_ELEMENTS),
2462 NONE,
2463 SLOPPY).Check(); 2459 SLOPPY).Check();
2464 } 2460 }
2465 2461
2466 2462
2467 Handle<FixedArray> Debug::GetLoadedScripts() { 2463 Handle<FixedArray> Debug::GetLoadedScripts() {
2468 // Create and fill the script cache when the loaded scripts is requested for 2464 // Create and fill the script cache when the loaded scripts is requested for
2469 // the first time. 2465 // the first time.
2470 if (script_cache_ == NULL) script_cache_ = new ScriptCache(isolate_); 2466 if (script_cache_ == NULL) script_cache_ = new ScriptCache(isolate_);
2471 2467
2472 // Perform GC to get unreferenced scripts evicted from the cache before 2468 // Perform GC to get unreferenced scripts evicted from the cache before
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
3404 logger_->DebugEvent("Put", message.text()); 3400 logger_->DebugEvent("Put", message.text());
3405 } 3401 }
3406 3402
3407 3403
3408 void LockingCommandMessageQueue::Clear() { 3404 void LockingCommandMessageQueue::Clear() {
3409 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3405 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3410 queue_.Clear(); 3406 queue_.Clear();
3411 } 3407 }
3412 3408
3413 } } // namespace v8::internal 3409 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698