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

Unified Diff: src/d8.cc

Issue 7218042: reverting revision r8454 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 7d16ec34731607261dc5f0487c9e580b1f45a85e..7655aad4b53dfefc4f19bc3fb15d7cea965dd098 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -599,36 +599,10 @@ Handle<ObjectTemplate> Shell::CreateGlobalTemplate() {
AddOSMethods(os_templ);
global_template->Set(String::New("os"), os_templ);
- Handle<ObjectTemplate> counter_templ = ObjectTemplate::New();
- counter_templ->Set(String::New("get"),
- FunctionTemplate::New(CounterGetValue));
- global_template->Set(String::New("counter"), counter_templ);
-
return global_template;
}
-Handle<Value> Shell::CounterGetValue(const Arguments& args){
- if (args.Length() != 1) {
- return ThrowException(String::New("get() takes one argument"));
- }
- if (args[0]->IsString()) {
- String::AsciiValue name(args[0]);
- Counter* counter = counter_map_->Lookup(*name);
- if (!counter) {
- String::AsciiValue prefixed(String::Concat(String::New("c:"),
- String::New(*name)));
- counter = counter_map_->Lookup(*prefixed);
- if (!counter) {
- return ThrowException(String::New("invalid counter name"));
- }
- }
- return Handle<Integer>::Cast(Integer::New(counter->count()));
- }
- return ThrowException(String::New("counter name must be a string"));
-}
-
-
void Shell::Initialize(bool test_shell) {
#ifdef COMPRESS_STARTUP_DATA_BZ2
BZip2Decompressor startup_data_decompressor;
« no previous file with comments | « src/d8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698