OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include <wtf/HashSet.h> | 7 #include <wtf/HashSet.h> |
8 #include <wtf/RefPtr.h> | 8 #include <wtf/RefPtr.h> |
9 #include <wtf/Vector.h> | 9 #include <wtf/Vector.h> |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 v8::Handle<v8::String> json_args_wrapper = v8::Handle<v8::String>( | 165 v8::Handle<v8::String> json_args_wrapper = v8::Handle<v8::String>( |
166 v8::String::New(json_args.utf8().data())); | 166 v8::String::New(json_args.utf8().data())); |
167 v8::Handle<v8::Value> args[] = { | 167 v8::Handle<v8::Value> args[] = { |
168 function_name_wrapper, | 168 function_name_wrapper, |
169 json_args_wrapper | 169 json_args_wrapper |
170 }; | 170 }; |
171 | 171 |
172 v8::TryCatch try_catch; | 172 v8::TryCatch try_catch; |
173 v8::Handle<v8::Value> res_obj = function->Call(context->Global(), 2, args); | 173 v8::Handle<v8::Value> res_obj = function->Call(context->Global(), 2, args); |
174 if (try_catch.HasCaught()) { | 174 if (try_catch.HasCaught()) { |
175 *exception = WebCore::ToWebCoreString(try_catch.Message()->Get()); | 175 *exception = WebCore::toWebCoreString(try_catch.Message()->Get()); |
176 return ""; | 176 return ""; |
177 } else { | 177 } else { |
178 v8::Handle<v8::String> res_json = v8::Handle<v8::String>::Cast(res_obj); | 178 v8::Handle<v8::String> res_json = v8::Handle<v8::String>::Cast(res_obj); |
179 return WebCore::toWebCoreString(res_json); | 179 return WebCore::toWebCoreString(res_json); |
180 } | 180 } |
181 } | 181 } |
182 | 182 |
183 WebCore::Page* DebuggerAgentImpl::GetPage() { | 183 WebCore::Page* DebuggerAgentImpl::GetPage() { |
184 return web_view_impl_->page(); | 184 return web_view_impl_->page(); |
185 } | 185 } |
OLD | NEW |