| Index: runtime/vm/runtime_entry_test.cc
|
| ===================================================================
|
| --- runtime/vm/runtime_entry_test.cc (revision 10199)
|
| +++ runtime/vm/runtime_entry_test.cc (working copy)
|
| @@ -13,18 +13,19 @@
|
| // Add function to a class and that class to the class dictionary so that
|
| // frame walking can be used.
|
| const Function& RegisterFakeFunction(const char* name, const Code& code) {
|
| + const String& class_name = String::Handle(Symbols::New("ownerClass"));
|
| + const Script& script = Script::Handle();
|
| + const Class& owner_class =
|
| + Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
|
| const String& function_name = String::ZoneHandle(Symbols::New(name));
|
| const Function& function = Function::ZoneHandle(
|
| Function::New(function_name, RawFunction::kRegularFunction,
|
| - true, false, false, false, 0));
|
| - Class& cls = Class::ZoneHandle();
|
| - const Script& script = Script::Handle();
|
| - cls = Class::New(function_name, script, Scanner::kDummyTokenIndex);
|
| + true, false, false, false, owner_class, 0));
|
| const Array& functions = Array::Handle(Array::New(1));
|
| functions.SetAt(0, function);
|
| - cls.SetFunctions(functions);
|
| + owner_class.SetFunctions(functions);
|
| Library& lib = Library::Handle(Library::CoreLibrary());
|
| - lib.AddClass(cls);
|
| + lib.AddClass(owner_class);
|
| function.SetCode(code);
|
| return function;
|
| }
|
|
|