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/debug.cc

Issue 234893003: Revert "Handlify GetProperty." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/bootstrapper.cc ('k') | src/execution.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 // 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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 1111
1112 // Ignore check if break point object is not a JSObject. 1112 // Ignore check if break point object is not a JSObject.
1113 if (!break_point_object->IsJSObject()) return true; 1113 if (!break_point_object->IsJSObject()) return true;
1114 1114
1115 // Get the function IsBreakPointTriggered (defined in debug-debugger.js). 1115 // Get the function IsBreakPointTriggered (defined in debug-debugger.js).
1116 Handle<String> is_break_point_triggered_string = 1116 Handle<String> is_break_point_triggered_string =
1117 factory->InternalizeOneByteString( 1117 factory->InternalizeOneByteString(
1118 STATIC_ASCII_VECTOR("IsBreakPointTriggered")); 1118 STATIC_ASCII_VECTOR("IsBreakPointTriggered"));
1119 Handle<GlobalObject> debug_global(debug_context()->global_object()); 1119 Handle<GlobalObject> debug_global(debug_context()->global_object());
1120 Handle<JSFunction> check_break_point = 1120 Handle<JSFunction> check_break_point =
1121 Handle<JSFunction>::cast(Object::GetProperty( 1121 Handle<JSFunction>::cast(GlobalObject::GetPropertyNoExceptionThrown(
1122 debug_global, is_break_point_triggered_string).ToHandleChecked()); 1122 debug_global, is_break_point_triggered_string));
1123 1123
1124 // Get the break id as an object. 1124 // Get the break id as an object.
1125 Handle<Object> break_id = factory->NewNumberFromInt(Debug::break_id()); 1125 Handle<Object> break_id = factory->NewNumberFromInt(Debug::break_id());
1126 1126
1127 // Call HandleBreakPointx. 1127 // Call HandleBreakPointx.
1128 Handle<Object> argv[] = { break_id, break_point_object }; 1128 Handle<Object> argv[] = { break_id, break_point_object };
1129 Handle<Object> result; 1129 Handle<Object> result;
1130 ASSIGN_RETURN_ON_EXCEPTION_VALUE( 1130 ASSIGN_RETURN_ON_EXCEPTION_VALUE(
1131 isolate_, result, 1131 isolate_, result,
1132 Execution::TryCall(check_break_point, 1132 Execution::TryCall(check_break_point,
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 2452
2453 2453
2454 void Debug::ClearMirrorCache() { 2454 void Debug::ClearMirrorCache() {
2455 PostponeInterruptsScope postpone(isolate_); 2455 PostponeInterruptsScope postpone(isolate_);
2456 HandleScope scope(isolate_); 2456 HandleScope scope(isolate_);
2457 ASSERT(isolate_->context() == *Debug::debug_context()); 2457 ASSERT(isolate_->context() == *Debug::debug_context());
2458 2458
2459 // Clear the mirror cache. 2459 // Clear the mirror cache.
2460 Handle<String> function_name = isolate_->factory()->InternalizeOneByteString( 2460 Handle<String> function_name = isolate_->factory()->InternalizeOneByteString(
2461 STATIC_ASCII_VECTOR("ClearMirrorCache")); 2461 STATIC_ASCII_VECTOR("ClearMirrorCache"));
2462 Handle<Object> fun = Object::GetProperty( 2462 Handle<Object> fun = GlobalObject::GetPropertyNoExceptionThrown(
2463 isolate_->global_object(), function_name).ToHandleChecked(); 2463 isolate_->global_object(), function_name);
2464 ASSERT(fun->IsJSFunction()); 2464 ASSERT(fun->IsJSFunction());
2465 Execution::TryCall( 2465 Execution::TryCall(
2466 Handle<JSFunction>::cast(fun), 2466 Handle<JSFunction>::cast(fun),
2467 Handle<JSObject>(Debug::debug_context()->global_object()), 2467 Handle<JSObject>(Debug::debug_context()->global_object()),
2468 0, 2468 0,
2469 NULL); 2469 NULL);
2470 } 2470 }
2471 2471
2472 2472
2473 void Debug::CreateScriptCache() { 2473 void Debug::CreateScriptCache() {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 MaybeHandle<Object> Debugger::MakeJSObject( 2590 MaybeHandle<Object> Debugger::MakeJSObject(
2591 Vector<const char> constructor_name, 2591 Vector<const char> constructor_name,
2592 int argc, 2592 int argc,
2593 Handle<Object> argv[]) { 2593 Handle<Object> argv[]) {
2594 ASSERT(isolate_->context() == *isolate_->debug()->debug_context()); 2594 ASSERT(isolate_->context() == *isolate_->debug()->debug_context());
2595 2595
2596 // Create the execution state object. 2596 // Create the execution state object.
2597 Handle<String> constructor_str = 2597 Handle<String> constructor_str =
2598 isolate_->factory()->InternalizeUtf8String(constructor_name); 2598 isolate_->factory()->InternalizeUtf8String(constructor_name);
2599 ASSERT(!constructor_str.is_null()); 2599 ASSERT(!constructor_str.is_null());
2600 Handle<Object> constructor = Object::GetProperty( 2600 Handle<Object> constructor = GlobalObject::GetPropertyNoExceptionThrown(
2601 isolate_->global_object(), constructor_str).ToHandleChecked(); 2601 isolate_->global_object(), constructor_str);
2602 ASSERT(constructor->IsJSFunction()); 2602 ASSERT(constructor->IsJSFunction());
2603 if (!constructor->IsJSFunction()) return MaybeHandle<Object>(); 2603 if (!constructor->IsJSFunction()) return MaybeHandle<Object>();
2604 return Execution::TryCall( 2604 return Execution::TryCall(
2605 Handle<JSFunction>::cast(constructor), 2605 Handle<JSFunction>::cast(constructor),
2606 Handle<JSObject>(isolate_->debug()->debug_context()->global_object()), 2606 Handle<JSObject>(isolate_->debug()->debug_context()->global_object()),
2607 argc, 2607 argc,
2608 argv); 2608 argv);
2609 } 2609 }
2610 2610
2611 2611
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 2781
2782 // If debugging there might be script break points registered for this 2782 // If debugging there might be script break points registered for this
2783 // script. Make sure that these break points are set. 2783 // script. Make sure that these break points are set.
2784 2784
2785 // Get the function UpdateScriptBreakPoints (defined in debug-debugger.js). 2785 // Get the function UpdateScriptBreakPoints (defined in debug-debugger.js).
2786 Handle<String> update_script_break_points_string = 2786 Handle<String> update_script_break_points_string =
2787 isolate_->factory()->InternalizeOneByteString( 2787 isolate_->factory()->InternalizeOneByteString(
2788 STATIC_ASCII_VECTOR("UpdateScriptBreakPoints")); 2788 STATIC_ASCII_VECTOR("UpdateScriptBreakPoints"));
2789 Handle<GlobalObject> debug_global(debug->debug_context()->global_object()); 2789 Handle<GlobalObject> debug_global(debug->debug_context()->global_object());
2790 Handle<Object> update_script_break_points = 2790 Handle<Object> update_script_break_points =
2791 Object::GetProperty( 2791 GlobalObject::GetPropertyNoExceptionThrown(
2792 debug_global, update_script_break_points_string).ToHandleChecked(); 2792 debug_global, update_script_break_points_string);
2793 if (!update_script_break_points->IsJSFunction()) { 2793 if (!update_script_break_points->IsJSFunction()) {
2794 return; 2794 return;
2795 } 2795 }
2796 ASSERT(update_script_break_points->IsJSFunction()); 2796 ASSERT(update_script_break_points->IsJSFunction());
2797 2797
2798 // Wrap the script object in a proper JS object before passing it 2798 // Wrap the script object in a proper JS object before passing it
2799 // to JavaScript. 2799 // to JavaScript.
2800 Handle<JSValue> wrapper = GetScriptWrapper(script); 2800 Handle<JSValue> wrapper = GetScriptWrapper(script);
2801 2801
2802 // Call UpdateScriptBreakPoints expect no exceptions. 2802 // Call UpdateScriptBreakPoints expect no exceptions.
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
3748 { 3748 {
3749 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); 3749 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_));
3750 isolate_->debugger()->CallMessageDispatchHandler(); 3750 isolate_->debugger()->CallMessageDispatchHandler();
3751 } 3751 }
3752 } 3752 }
3753 } 3753 }
3754 3754
3755 #endif // ENABLE_DEBUGGER_SUPPORT 3755 #endif // ENABLE_DEBUGGER_SUPPORT
3756 3756
3757 } } // namespace v8::internal 3757 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698