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

Unified Diff: runtime/vm/find_code_object_test.cc

Issue 82713009: Fixes FindCodeObject test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/find_code_object_test.cc
===================================================================
--- runtime/vm/find_code_object_test.cc (revision 30603)
+++ runtime/vm/find_code_object_test.cc (working copy)
@@ -22,6 +22,12 @@
const int kScriptSize = 512 * KB;
const int kNumFunctions = 1024;
char scriptChars[kScriptSize];
+
+ // Get access to the code index table.
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate != NULL);
+
+ StackZone zone(isolate);
String& url = String::Handle(String::New("dart-test:FindCodeObject"));
String& source = String::Handle();
Script& script = Script::Handle();
@@ -32,10 +38,6 @@
Function& function = Function::Handle();
char buffer[256];
- // Get access to the code index table.
- Isolate* isolate = Isolate::Current();
- ASSERT(isolate != NULL);
-
lib = Library::CoreLibrary();
// Load up class A with 1024 functions.
@@ -62,6 +64,8 @@
function = clsA.LookupStaticFunction(function_name);
EXPECT(!function.IsNull());
EXPECT(CompilerTest::TestCompileFunction(function));
+ const Code& code = Code::ZoneHandle(function.CurrentCode());
+ EXPECT(!code.IsNull())
EXPECT(function.HasCode());
}
@@ -110,6 +114,8 @@
function = clsB.LookupStaticFunction(function_name);
EXPECT(!function.IsNull());
EXPECT(CompilerTest::TestCompileFunction(function));
+ const Code& code = Code::ZoneHandle(function.CurrentCode());
+ EXPECT(!code.IsNull());
EXPECT(function.HasCode());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698