| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 184 } |
| 185 | 185 |
| 186 void ScriptDebugServer::breakProgram() | 186 void ScriptDebugServer::breakProgram() |
| 187 { | 187 { |
| 188 if (!canBreakProgram()) | 188 if (!canBreakProgram()) |
| 189 return; | 189 return; |
| 190 | 190 |
| 191 v8::HandleScope scope(m_isolate); | 191 v8::HandleScope scope(m_isolate); |
| 192 if (m_breakProgramCallbackTemplate.isEmpty()) { | 192 if (m_breakProgramCallbackTemplate.isEmpty()) { |
| 193 v8::Handle<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(); | 193 v8::Handle<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(); |
| 194 templ->SetCallHandler(&ScriptDebugServer::breakProgramCallback, v8::Exte
rnal::New(this)); | 194 templ->SetCallHandler(&ScriptDebugServer::breakProgramCallback, v8::Exte
rnal::New(m_isolate, this)); |
| 195 m_breakProgramCallbackTemplate.set(m_isolate, templ); | 195 m_breakProgramCallbackTemplate.set(m_isolate, templ); |
| 196 } | 196 } |
| 197 | 197 |
| 198 m_pausedContext = m_isolate->GetCurrentContext(); | 198 m_pausedContext = m_isolate->GetCurrentContext(); |
| 199 v8::Handle<v8::Function> breakProgramFunction = m_breakProgramCallbackTempla
te.newLocal(m_isolate)->GetFunction(); | 199 v8::Handle<v8::Function> breakProgramFunction = m_breakProgramCallbackTempla
te.newLocal(m_isolate)->GetFunction(); |
| 200 v8::Debug::Call(breakProgramFunction); | 200 v8::Debug::Call(breakProgramFunction); |
| 201 m_pausedContext.Clear(); | 201 m_pausedContext.Clear(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void ScriptDebugServer::continueProgram() | 204 void ScriptDebugServer::continueProgram() |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 { | 616 { |
| 617 return PassOwnPtr<ScriptSourceCode>(); | 617 return PassOwnPtr<ScriptSourceCode>(); |
| 618 } | 618 } |
| 619 | 619 |
| 620 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) | 620 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) |
| 621 { | 621 { |
| 622 return source; | 622 return source; |
| 623 } | 623 } |
| 624 | 624 |
| 625 } // namespace WebCore | 625 } // namespace WebCore |
| OLD | NEW |