diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 04:01:10 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 04:01:10 +0000 |
commit | 9deaf306197e5137e7acc920a25873242e6f8c10 (patch) | |
tree | 3ae6852881d60a1da45834092c54dc19f59498c7 /webkit/extensions/v8/benchmarking_extension.cc | |
parent | ec0b6c4eab34c0018869aad1e215aaa3868b3b55 (diff) | |
download | chromium_src-9deaf306197e5137e7acc920a25873242e6f8c10.zip chromium_src-9deaf306197e5137e7acc920a25873242e6f8c10.tar.gz chromium_src-9deaf306197e5137e7acc920a25873242e6f8c10.tar.bz2 |
Revert 57386:
The interval test started failing after we rolled back to a previous version of Webkit. This code
does not seem to support it.
Original description: Move the chromium.Interval to chrome.Interval as part of the benchmarking
extension. This means that users will need to use --enable-benchmarking
to access it. It really shouldn't be part of the exposed API.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3126029
TBR=mbelshe@chromium.org
Review URL: http://codereview.chromium.org/3186033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/extensions/v8/benchmarking_extension.cc')
-rw-r--r-- | webkit/extensions/v8/benchmarking_extension.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/webkit/extensions/v8/benchmarking_extension.cc b/webkit/extensions/v8/benchmarking_extension.cc index 1a30968..31bb080 100644 --- a/webkit/extensions/v8/benchmarking_extension.cc +++ b/webkit/extensions/v8/benchmarking_extension.cc @@ -4,7 +4,6 @@ #include "base/command_line.h" #include "base/stats_table.h" -#include "base/time.h" #include "net/http/http_network_layer.h" #include "third_party/WebKit/WebKit/chromium/public/WebCache.h" #include "webkit/extensions/v8/benchmarking_extension.h" @@ -46,26 +45,6 @@ class BenchmarkingWrapper : public v8::Extension { " native function IsSingleProcess();" " return IsSingleProcess();" "};" - "chrome.Interval = function() {" - " var start_ = 0;" - " var stop_ = 0;" - " native function HiResTime();" - " this.start = function() {" - " stop_ = 0;" - " start_ = HiResTime();" - " };" - " this.stop = function() {" - " stop_ = HiResTime();" - " if (start_ == 0)" - " stop_ = 0;" - " };" - " this.microseconds = function() {" - " var stop = stop_;" - " if (stop == 0 && start_ != 0)" - " stop = HiResTime();" - " return Math.ceil(stop - start_);" - " };" - "}" ) {} virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( @@ -80,10 +59,7 @@ class BenchmarkingWrapper : public v8::Extension { return v8::FunctionTemplate::New(GetCounter); } else if (name->Equals(v8::String::New("IsSingleProcess"))) { return v8::FunctionTemplate::New(IsSingleProcess); - } else if (name->Equals(v8::String::New("HiResTime"))) { - return v8::FunctionTemplate::New(HiResTime); } - return v8::Handle<v8::FunctionTemplate>(); } @@ -123,11 +99,6 @@ class BenchmarkingWrapper : public v8::Extension { static v8::Handle<v8::Value> IsSingleProcess(const v8::Arguments& args) { return v8::Boolean::New(webkit_glue::IsSingleProcess()); } - - static v8::Handle<v8::Value> HiResTime(const v8::Arguments& args) { - return v8::Number::New( - static_cast<double>(base::TimeTicks::HighResNow().ToInternalValue())); - } }; v8::Extension* BenchmarkingExtension::Get() { |