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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 args->Set(v8::String::NewSymbol("columnNumber"), v8::Integer::New(scriptBrea
kpoint.columnNumber, debuggerContext->GetIsolate())); | 95 args->Set(v8::String::NewSymbol("columnNumber"), v8::Integer::New(scriptBrea
kpoint.columnNumber, debuggerContext->GetIsolate())); |
96 args->Set(v8::String::NewSymbol("interstatementLocation"), v8Boolean(interst
atementLocation, debuggerContext->GetIsolate())); | 96 args->Set(v8::String::NewSymbol("interstatementLocation"), v8Boolean(interst
atementLocation, debuggerContext->GetIsolate())); |
97 args->Set(v8::String::NewSymbol("condition"), v8String(scriptBreakpoint.cond
ition, debuggerContext->GetIsolate())); | 97 args->Set(v8::String::NewSymbol("condition"), v8String(scriptBreakpoint.cond
ition, debuggerContext->GetIsolate())); |
98 | 98 |
99 v8::Handle<v8::Function> setBreakpointFunction = v8::Local<v8::Function>::Ca
st(m_debuggerScript.newLocal(m_isolate)->Get(v8::String::NewSymbol("setBreakpoin
t"))); | 99 v8::Handle<v8::Function> setBreakpointFunction = v8::Local<v8::Function>::Ca
st(m_debuggerScript.newLocal(m_isolate)->Get(v8::String::NewSymbol("setBreakpoin
t"))); |
100 v8::Handle<v8::Value> breakpointId = v8::Debug::Call(setBreakpointFunction,
args); | 100 v8::Handle<v8::Value> breakpointId = v8::Debug::Call(setBreakpointFunction,
args); |
101 if (!breakpointId->IsString()) | 101 if (!breakpointId->IsString()) |
102 return ""; | 102 return ""; |
103 *actualLineNumber = args->Get(v8::String::NewSymbol("lineNumber"))->Int32Val
ue(); | 103 *actualLineNumber = args->Get(v8::String::NewSymbol("lineNumber"))->Int32Val
ue(); |
104 *actualColumnNumber = args->Get(v8::String::NewSymbol("columnNumber"))->Int3
2Value(); | 104 *actualColumnNumber = args->Get(v8::String::NewSymbol("columnNumber"))->Int3
2Value(); |
105 return toWebCoreString(breakpointId->ToString()); | 105 return toWebCoreString(breakpointId.As<v8::String>()); |
106 } | 106 } |
107 | 107 |
108 void ScriptDebugServer::removeBreakpoint(const String& breakpointId) | 108 void ScriptDebugServer::removeBreakpoint(const String& breakpointId) |
109 { | 109 { |
110 v8::HandleScope scope(m_isolate); | 110 v8::HandleScope scope(m_isolate); |
111 v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext(); | 111 v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext(); |
112 v8::Context::Scope contextScope(debuggerContext); | 112 v8::Context::Scope contextScope(debuggerContext); |
113 | 113 |
114 v8::Local<v8::Object> args = v8::Object::New(); | 114 v8::Local<v8::Object> args = v8::Object::New(); |
115 args->Set(v8::String::NewSymbol("breakpointId"), v8String(breakpointId, debu
ggerContext->GetIsolate())); | 115 args->Set(v8::String::NewSymbol("breakpointId"), v8String(breakpointId, debu
ggerContext->GetIsolate())); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 { | 614 { |
615 return PassOwnPtr<ScriptSourceCode>(); | 615 return PassOwnPtr<ScriptSourceCode>(); |
616 } | 616 } |
617 | 617 |
618 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) | 618 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) |
619 { | 619 { |
620 return source; | 620 return source; |
621 } | 621 } |
622 | 622 |
623 } // namespace WebCore | 623 } // namespace WebCore |
OLD | NEW |