GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: V8: cherry-pick a1efa5343880 · nodejs/node@0c40b51

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • common.gypi
  • deps/v8/src/objects
    • js-function.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.20',
39+
'v8_embedder_string': '-node.21',
4040

4141
##### V8 defaults for Node.js #####
4242

Collapse file

‎deps/v8/src/objects/js-function.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/objects/js-function.cc
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,10 @@ void SetInstancePrototype(Isolate* isolate, Handle<JSFunction> function,
676676
// At that point, a new initial map is created and the prototype is put
677677
// into the initial map where it belongs.
678678
function->set_prototype_or_initial_map(*value, kReleaseStore);
679+
if (value->IsJSObjectThatCanBeTrackedAsPrototype()) {
680+
// Optimize as prototype to detach it from its transition tree.
681+
JSObject::OptimizeAsPrototype(Handle<JSObject>::cast(value));
682+
}
679683
} else {
680684
Handle<Map> new_map =
681685
Map::Copy(isolate, initial_map, "SetInstancePrototype");
@@ -801,8 +805,10 @@ void JSFunction::EnsureHasInitialMap(Handle<JSFunction> function) {
801805
Handle<HeapObject> prototype;
802806
if (function->has_instance_prototype()) {
803807
prototype = handle(function->instance_prototype(), isolate);
808+
map->set_prototype(*prototype);
804809
} else {
805810
prototype = isolate->factory()->NewFunctionPrototype(function);
811+
Map::SetPrototype(isolate, map, prototype);
806812
}
807813
DCHECK(map->has_fast_object_elements());
808814

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.