OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2288 Handle<JSMessageObject> message_obj = New<JSMessageObject>(map, NEW_SPACE); | 2288 Handle<JSMessageObject> message_obj = New<JSMessageObject>(map, NEW_SPACE); |
2289 message_obj->set_properties(*empty_fixed_array(), SKIP_WRITE_BARRIER); | 2289 message_obj->set_properties(*empty_fixed_array(), SKIP_WRITE_BARRIER); |
2290 message_obj->initialize_elements(); | 2290 message_obj->initialize_elements(); |
2291 message_obj->set_elements(*empty_fixed_array(), SKIP_WRITE_BARRIER); | 2291 message_obj->set_elements(*empty_fixed_array(), SKIP_WRITE_BARRIER); |
2292 message_obj->set_type(message); | 2292 message_obj->set_type(message); |
2293 message_obj->set_argument(*argument); | 2293 message_obj->set_argument(*argument); |
2294 message_obj->set_start_position(start_position); | 2294 message_obj->set_start_position(start_position); |
2295 message_obj->set_end_position(end_position); | 2295 message_obj->set_end_position(end_position); |
2296 message_obj->set_script(*script); | 2296 message_obj->set_script(*script); |
2297 message_obj->set_stack_frames(*stack_frames); | 2297 message_obj->set_stack_frames(*stack_frames); |
| 2298 message_obj->set_error_level(v8::Isolate::kMessageError); |
2298 return message_obj; | 2299 return message_obj; |
2299 } | 2300 } |
2300 | 2301 |
2301 | 2302 |
2302 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( | 2303 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
2303 Handle<String> name, MaybeHandle<Code> maybe_code, bool is_constructor) { | 2304 Handle<String> name, MaybeHandle<Code> maybe_code, bool is_constructor) { |
2304 // Function names are assumed to be flat elsewhere. Must flatten before | 2305 // Function names are assumed to be flat elsewhere. Must flatten before |
2305 // allocating SharedFunctionInfo to avoid GC seeing the uninitialized SFI. | 2306 // allocating SharedFunctionInfo to avoid GC seeing the uninitialized SFI. |
2306 name = String::Flatten(name, TENURED); | 2307 name = String::Flatten(name, TENURED); |
2307 | 2308 |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2778 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); | 2779 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); |
2779 iterator->set_initial_next(*next); | 2780 iterator->set_initial_next(*next); |
2780 iterator->set_array(*array); | 2781 iterator->set_array(*array); |
2781 iterator->set_index(0); | 2782 iterator->set_index(0); |
2782 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); | 2783 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); |
2783 return iterator; | 2784 return iterator; |
2784 } | 2785 } |
2785 | 2786 |
2786 } // namespace internal | 2787 } // namespace internal |
2787 } // namespace v8 | 2788 } // namespace v8 |
OLD | NEW |