| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2149 } | 2149 } |
| 2150 | 2150 |
| 2151 | 2151 |
| 2152 Handle<Object> Debugger::MakeExceptionEvent(Handle<Object> exec_state, | 2152 Handle<Object> Debugger::MakeExceptionEvent(Handle<Object> exec_state, |
| 2153 Handle<Object> exception, | 2153 Handle<Object> exception, |
| 2154 bool uncaught, | 2154 bool uncaught, |
| 2155 bool* caught_exception) { | 2155 bool* caught_exception) { |
| 2156 Factory* factory = isolate_->factory(); | 2156 Factory* factory = isolate_->factory(); |
| 2157 // Create the new exception event object. | 2157 // Create the new exception event object. |
| 2158 const int argc = 3; | 2158 const int argc = 3; |
| 2159 Object** argv[argc] = { exec_state.location(), | 2159 Object** argv[argc] = |
| 2160 exception.location(), | 2160 { exec_state.location(), |
| 2161 uncaught ? factory->true_value().location() : | 2161 exception.location(), |
| 2162 factory->false_value().location()}; | 2162 factory->ToBoolean(uncaught).location() }; |
| 2163 return MakeJSObject(CStrVector("MakeExceptionEvent"), | 2163 return MakeJSObject(CStrVector("MakeExceptionEvent"), |
| 2164 argc, argv, caught_exception); | 2164 argc, argv, caught_exception); |
| 2165 } | 2165 } |
| 2166 | 2166 |
| 2167 | 2167 |
| 2168 Handle<Object> Debugger::MakeNewFunctionEvent(Handle<Object> function, | 2168 Handle<Object> Debugger::MakeNewFunctionEvent(Handle<Object> function, |
| 2169 bool* caught_exception) { | 2169 bool* caught_exception) { |
| 2170 // Create the new function event object. | 2170 // Create the new function event object. |
| 2171 const int argc = 1; | 2171 const int argc = 1; |
| 2172 Object** argv[argc] = { function.location() }; | 2172 Object** argv[argc] = { function.location() }; |
| 2173 return MakeJSObject(CStrVector("MakeNewFunctionEvent"), | 2173 return MakeJSObject(CStrVector("MakeNewFunctionEvent"), |
| 2174 argc, argv, caught_exception); | 2174 argc, argv, caught_exception); |
| 2175 } | 2175 } |
| 2176 | 2176 |
| 2177 | 2177 |
| 2178 Handle<Object> Debugger::MakeCompileEvent(Handle<Script> script, | 2178 Handle<Object> Debugger::MakeCompileEvent(Handle<Script> script, |
| 2179 bool before, | 2179 bool before, |
| 2180 bool* caught_exception) { | 2180 bool* caught_exception) { |
| 2181 Factory* factory = isolate_->factory(); | 2181 Factory* factory = isolate_->factory(); |
| 2182 // Create the compile event object. | 2182 // Create the compile event object. |
| 2183 Handle<Object> exec_state = MakeExecutionState(caught_exception); | 2183 Handle<Object> exec_state = MakeExecutionState(caught_exception); |
| 2184 Handle<Object> script_wrapper = GetScriptWrapper(script); | 2184 Handle<Object> script_wrapper = GetScriptWrapper(script); |
| 2185 const int argc = 3; | 2185 const int argc = 3; |
| 2186 Object** argv[argc] = { exec_state.location(), | 2186 Object** argv[argc] = |
| 2187 script_wrapper.location(), | 2187 { exec_state.location(), |
| 2188 before ? factory->true_value().location() : | 2188 script_wrapper.location(), |
| 2189 factory->false_value().location() }; | 2189 factory->ToBoolean(before).location() }; |
| 2190 | 2190 |
| 2191 return MakeJSObject(CStrVector("MakeCompileEvent"), | 2191 return MakeJSObject(CStrVector("MakeCompileEvent"), |
| 2192 argc, | 2192 argc, |
| 2193 argv, | 2193 argv, |
| 2194 caught_exception); | 2194 caught_exception); |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 | 2197 |
| 2198 Handle<Object> Debugger::MakeScriptCollectedEvent(int id, | 2198 Handle<Object> Debugger::MakeScriptCollectedEvent(int id, |
| 2199 bool* caught_exception) { | 2199 bool* caught_exception) { |
| (...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3321 { | 3321 { |
| 3322 Locker locker; | 3322 Locker locker; |
| 3323 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3323 Isolate::Current()->debugger()->CallMessageDispatchHandler(); |
| 3324 } | 3324 } |
| 3325 } | 3325 } |
| 3326 } | 3326 } |
| 3327 | 3327 |
| 3328 #endif // ENABLE_DEBUGGER_SUPPORT | 3328 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3329 | 3329 |
| 3330 } } // namespace v8::internal | 3330 } } // namespace v8::internal |
| OLD | NEW |