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

Side by Side Diff: Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 8872059: Merge 102140 - [Chromium] Web Inspector: getFunctionLocation should return scriptId as String not... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 9 years 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
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/inspector/Inspector.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2011 Google Inc. All rights reserved. 2 * Copyright (C) 2007-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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 v8::Handle<v8::Value> value = args[0]; 161 v8::Handle<v8::Value> value = args[0];
162 if (!value->IsFunction()) 162 if (!value->IsFunction())
163 return v8::Undefined(); 163 return v8::Undefined();
164 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(value); 164 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(value);
165 int lineNumber = function->GetScriptLineNumber(); 165 int lineNumber = function->GetScriptLineNumber();
166 int columnNumber = function->GetScriptColumnNumber(); 166 int columnNumber = function->GetScriptColumnNumber();
167 v8::Local<v8::Object> result = v8::Object::New(); 167 v8::Local<v8::Object> result = v8::Object::New();
168 result->Set(v8::String::New("lineNumber"), v8::Integer::New(lineNumber)); 168 result->Set(v8::String::New("lineNumber"), v8::Integer::New(lineNumber));
169 result->Set(v8::String::New("columnNumber"), v8::Integer::New(columnNumber)) ; 169 result->Set(v8::String::New("columnNumber"), v8::Integer::New(columnNumber)) ;
170 result->Set(v8::String::New("scriptId"), function->GetScriptId()); 170 result->Set(v8::String::New("scriptId"), function->GetScriptId()->ToString() );
171 return result; 171 return result;
172 } 172 }
173 173
174 v8::Handle<v8::Value> V8InjectedScriptHost::inspectCallback(const v8::Arguments& args) 174 v8::Handle<v8::Value> V8InjectedScriptHost::inspectCallback(const v8::Arguments& args)
175 { 175 {
176 INC_STATS("InjectedScriptHost.inspect()"); 176 INC_STATS("InjectedScriptHost.inspect()");
177 if (args.Length() < 2) 177 if (args.Length() < 2)
178 return v8::Undefined(); 178 return v8::Undefined();
179 179
180 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); 180 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
(...skipping 26 matching lines...) Expand all
207 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); 207 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
208 Storage* storage = V8Storage::toNative(v8::Handle<v8::Object>::Cast(args[0]) ); 208 Storage* storage = V8Storage::toNative(v8::Handle<v8::Object>::Cast(args[0]) );
209 if (storage) 209 if (storage)
210 return v8::Number::New(host->storageIdImpl(storage)); 210 return v8::Number::New(host->storageIdImpl(storage));
211 return v8::Undefined(); 211 return v8::Undefined();
212 } 212 }
213 213
214 } // namespace WebCore 214 } // namespace WebCore
215 215
216 #endif // ENABLE(INSPECTOR) 216 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/inspector/Inspector.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698