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

Side by Side Diff: test/cctest/wasm/test-wasm-breakpoints.cc

Issue 2156303002: Implement new Function.prototype.toString and fix CreateDynamicFunction parsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « src/string-builder.h ('k') | test/mjsunit/harmony/function-tostring.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 "src/debug/debug-interface.h" 5 #include "src/debug/debug-interface.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/property-descriptor.h" 7 #include "src/property-descriptor.h"
8 #include "src/utils.h" 8 #include "src/utils.h"
9 #include "src/wasm/wasm-macro-gen.h" 9 #include "src/wasm/wasm-macro-gen.h"
10 #include "src/wasm/wasm-objects.h" 10 #include "src/wasm/wasm-objects.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 Handle<JSObject> MakeFakeBreakpoint(Isolate* isolate, int position) { 132 Handle<JSObject> MakeFakeBreakpoint(Isolate* isolate, int position) {
133 Handle<JSObject> obj = 133 Handle<JSObject> obj =
134 isolate->factory()->NewJSObject(isolate->object_function()); 134 isolate->factory()->NewJSObject(isolate->object_function());
135 // Generate an "isTriggered" method that always returns true. 135 // Generate an "isTriggered" method that always returns true.
136 // This can/must be refactored once we remove remaining JS parts from the 136 // This can/must be refactored once we remove remaining JS parts from the
137 // debugger (bug 5530). 137 // debugger (bug 5530).
138 Handle<String> source = isolate->factory()->NewStringFromStaticChars("true"); 138 Handle<String> source = isolate->factory()->NewStringFromStaticChars("true");
139 Handle<Context> context(isolate->context(), isolate); 139 Handle<Context> context(isolate->context(), isolate);
140 Handle<JSFunction> triggered_fun = 140 Handle<JSFunction> triggered_fun =
141 Compiler::GetFunctionFromString(context, source, NO_PARSE_RESTRICTION) 141 Compiler::GetFunctionFromString(context, source, NO_PARSE_RESTRICTION,
142 kNoSourcePosition)
142 .ToHandleChecked(); 143 .ToHandleChecked();
143 PropertyDescriptor desc; 144 PropertyDescriptor desc;
144 desc.set_value(triggered_fun); 145 desc.set_value(triggered_fun);
145 Handle<String> name = 146 Handle<String> name =
146 isolate->factory()->InternalizeUtf8String(CStrVector("isTriggered")); 147 isolate->factory()->InternalizeUtf8String(CStrVector("isTriggered"));
147 CHECK( 148 CHECK(
148 JSObject::DefineOwnProperty(isolate, obj, name, &desc, Object::DONT_THROW) 149 JSObject::DefineOwnProperty(isolate, obj, name, &desc, Object::DONT_THROW)
149 .FromMaybe(false)); 150 .FromMaybe(false));
150 return obj; 151 return obj;
151 } 152 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 {19, BreakHandler::StepIn}, // GetLocal 279 {19, BreakHandler::StepIn}, // GetLocal
279 {21, BreakHandler::StepIn}, // Call 280 {21, BreakHandler::StepIn}, // Call
280 {1, BreakHandler::StepOut}, // in f2 281 {1, BreakHandler::StepOut}, // in f2
281 {23, BreakHandler::Continue} // After Call 282 {23, BreakHandler::Continue} // After Call
282 }); 283 });
283 284
284 Handle<Object> global(isolate->context()->global_object(), isolate); 285 Handle<Object> global(isolate->context()->global_object(), isolate);
285 CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 0, nullptr) 286 CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 0, nullptr)
286 .is_null()); 287 .is_null());
287 } 288 }
OLDNEW
« no previous file with comments | « src/string-builder.h ('k') | test/mjsunit/harmony/function-tostring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698