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

Side by Side Diff: src/debug.cc

Issue 3446028: Merge r5509, r5512, r5530 to 2.3 branch ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: '' Created 10 years, 2 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/compiler.cc ('k') | src/handles.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 1026
1027 1027
1028 // Check whether a single break point object is triggered. 1028 // Check whether a single break point object is triggered.
1029 bool Debug::CheckBreakPoint(Handle<Object> break_point_object) { 1029 bool Debug::CheckBreakPoint(Handle<Object> break_point_object) {
1030 HandleScope scope; 1030 HandleScope scope;
1031 1031
1032 // Ignore check if break point object is not a JSObject. 1032 // Ignore check if break point object is not a JSObject.
1033 if (!break_point_object->IsJSObject()) return true; 1033 if (!break_point_object->IsJSObject()) return true;
1034 1034
1035 // Get the function CheckBreakPoint (defined in debug.js). 1035 // Get the function CheckBreakPoint (defined in debug.js).
1036 Handle<String> is_break_point_triggered_symbol =
1037 Factory::LookupAsciiSymbol("IsBreakPointTriggered");
1036 Handle<JSFunction> check_break_point = 1038 Handle<JSFunction> check_break_point =
1037 Handle<JSFunction>(JSFunction::cast( 1039 Handle<JSFunction>(JSFunction::cast(
1038 debug_context()->global()->GetProperty( 1040 debug_context()->global()->GetProperty(
1039 *Factory::LookupAsciiSymbol("IsBreakPointTriggered")))); 1041 *is_break_point_triggered_symbol)));
1040 1042
1041 // Get the break id as an object. 1043 // Get the break id as an object.
1042 Handle<Object> break_id = Factory::NewNumberFromInt(Debug::break_id()); 1044 Handle<Object> break_id = Factory::NewNumberFromInt(Debug::break_id());
1043 1045
1044 // Call HandleBreakPointx. 1046 // Call HandleBreakPointx.
1045 bool caught_exception = false; 1047 bool caught_exception = false;
1046 const int argc = 2; 1048 const int argc = 2;
1047 Object** argv[argc] = { 1049 Object** argv[argc] = {
1048 break_id.location(), 1050 break_id.location(),
1049 reinterpret_cast<Object**>(break_point_object.location()) 1051 reinterpret_cast<Object**>(break_point_object.location())
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 bool in_debugger = Debug::InDebugger(); 2161 bool in_debugger = Debug::InDebugger();
2160 2162
2161 // Enter the debugger. 2163 // Enter the debugger.
2162 EnterDebugger debugger; 2164 EnterDebugger debugger;
2163 if (debugger.FailedToEnter()) return; 2165 if (debugger.FailedToEnter()) return;
2164 2166
2165 // If debugging there might be script break points registered for this 2167 // If debugging there might be script break points registered for this
2166 // script. Make sure that these break points are set. 2168 // script. Make sure that these break points are set.
2167 2169
2168 // Get the function UpdateScriptBreakPoints (defined in debug-debugger.js). 2170 // Get the function UpdateScriptBreakPoints (defined in debug-debugger.js).
2171 Handle<String> update_script_break_points_symbol =
2172 Factory::LookupAsciiSymbol("UpdateScriptBreakPoints");
2169 Handle<Object> update_script_break_points = 2173 Handle<Object> update_script_break_points =
2170 Handle<Object>(Debug::debug_context()->global()->GetProperty( 2174 Handle<Object>(Debug::debug_context()->global()->GetProperty(
2171 *Factory::LookupAsciiSymbol("UpdateScriptBreakPoints"))); 2175 *update_script_break_points_symbol));
2172 if (!update_script_break_points->IsJSFunction()) { 2176 if (!update_script_break_points->IsJSFunction()) {
2173 return; 2177 return;
2174 } 2178 }
2175 ASSERT(update_script_break_points->IsJSFunction()); 2179 ASSERT(update_script_break_points->IsJSFunction());
2176 2180
2177 // Wrap the script object in a proper JS object before passing it 2181 // Wrap the script object in a proper JS object before passing it
2178 // to JavaScript. 2182 // to JavaScript.
2179 Handle<JSValue> wrapper = GetScriptWrapper(script); 2183 Handle<JSValue> wrapper = GetScriptWrapper(script);
2180 2184
2181 // Call UpdateScriptBreakPoints expect no exceptions. 2185 // Call UpdateScriptBreakPoints expect no exceptions.
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 { 3050 {
3047 Locker locker; 3051 Locker locker;
3048 Debugger::CallMessageDispatchHandler(); 3052 Debugger::CallMessageDispatchHandler();
3049 } 3053 }
3050 } 3054 }
3051 } 3055 }
3052 3056
3053 #endif // ENABLE_DEBUGGER_SUPPORT 3057 #endif // ENABLE_DEBUGGER_SUPPORT
3054 3058
3055 } } // namespace v8::internal 3059 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698