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

Side by Side Diff: src/bootstrapper.cc

Issue 1982203003: [runtime] Fix effect of setting .prototype on generator functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ignition test rebaseline Created 4 years, 7 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 | « no previous file | src/contexts.h » ('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 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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/extensions/externalize-string-extension.h" 10 #include "src/extensions/externalize-string-extension.h"
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 strict_function_map_writable_prototype_ = 742 strict_function_map_writable_prototype_ =
743 CreateStrictFunctionMap(FUNCTION_WITH_WRITEABLE_PROTOTYPE, empty); 743 CreateStrictFunctionMap(FUNCTION_WITH_WRITEABLE_PROTOTYPE, empty);
744 } 744 }
745 745
746 void Genesis::CreateIteratorMaps(Handle<JSFunction> empty) { 746 void Genesis::CreateIteratorMaps(Handle<JSFunction> empty) {
747 // Create iterator-related meta-objects. 747 // Create iterator-related meta-objects.
748 Handle<JSObject> iterator_prototype = 748 Handle<JSObject> iterator_prototype =
749 factory()->NewJSObject(isolate()->object_function(), TENURED); 749 factory()->NewJSObject(isolate()->object_function(), TENURED);
750 Handle<JSObject> generator_object_prototype = 750 Handle<JSObject> generator_object_prototype =
751 factory()->NewJSObject(isolate()->object_function(), TENURED); 751 factory()->NewJSObject(isolate()->object_function(), TENURED);
752 native_context()->set_initial_generator_prototype(
753 *generator_object_prototype);
752 SetObjectPrototype(generator_object_prototype, iterator_prototype); 754 SetObjectPrototype(generator_object_prototype, iterator_prototype);
753 Handle<JSObject> generator_function_prototype = 755 Handle<JSObject> generator_function_prototype =
754 factory()->NewJSObject(isolate()->object_function(), TENURED); 756 factory()->NewJSObject(isolate()->object_function(), TENURED);
755 SetObjectPrototype(generator_function_prototype, empty); 757 SetObjectPrototype(generator_function_prototype, empty);
756 758
757 JSObject::AddProperty( 759 JSObject::AddProperty(
758 generator_function_prototype, factory()->to_string_tag_symbol(), 760 generator_function_prototype, factory()->to_string_tag_symbol(),
759 factory()->NewStringFromAsciiChecked("GeneratorFunction"), 761 factory()->NewStringFromAsciiChecked("GeneratorFunction"),
760 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); 762 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY));
761 JSObject::AddProperty(generator_function_prototype, 763 JSObject::AddProperty(generator_function_prototype,
(...skipping 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after
3767 } 3769 }
3768 3770
3769 3771
3770 // Called when the top-level V8 mutex is destroyed. 3772 // Called when the top-level V8 mutex is destroyed.
3771 void Bootstrapper::FreeThreadResources() { 3773 void Bootstrapper::FreeThreadResources() {
3772 DCHECK(!IsActive()); 3774 DCHECK(!IsActive());
3773 } 3775 }
3774 3776
3775 } // namespace internal 3777 } // namespace internal
3776 } // namespace v8 3778 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698