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

Side by Side Diff: chrome/test/base/module_system_test.cc

Issue 23679004: Remove more calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/test/base/module_system_test.h" 5 #include "chrome/test/base/module_system_test.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 EXPECT_EQ(should_assertions_be_made_, 181 EXPECT_EQ(should_assertions_be_made_,
182 assert_natives_->assertion_made()); 182 assert_natives_->assertion_made());
183 EXPECT_FALSE(assert_natives_->failed()); 183 EXPECT_FALSE(assert_natives_->failed());
184 } 184 }
185 185
186 void ModuleSystemTest::ExpectNoAssertionsMade() { 186 void ModuleSystemTest::ExpectNoAssertionsMade() {
187 should_assertions_be_made_ = false; 187 should_assertions_be_made_ = false;
188 } 188 }
189 189
190 v8::Handle<v8::Object> ModuleSystemTest::CreateGlobal(const std::string& name) { 190 v8::Handle<v8::Object> ModuleSystemTest::CreateGlobal(const std::string& name) {
191 v8::HandleScope handle_scope; 191 v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
192 v8::Handle<v8::Object> object = v8::Object::New(); 192 v8::Handle<v8::Object> object = v8::Object::New();
193 v8::Context::GetCurrent()->Global()->Set(v8::String::New(name.c_str()), 193 v8::Context::GetCurrent()->Global()->Set(v8::String::New(name.c_str()),
194 object); 194 object);
195 return handle_scope.Close(object); 195 return handle_scope.Close(object);
196 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698