Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2870061

Browse filesBrowse files
fhinkelevanlucas
authored andcommitted
deps: cherry-pick 5b5d24b for X87 from V8 upstream
Original commit message: port 2aa070b (r34863) original commit message: Repair this to match what the runtime correctly does, by first checking if the function is a constructor before we access the prototype. BUG= Review URL: https://codereview.chromium.org/1809333002 Cr-Commit-Position: refs/heads/master@{#34880} Fixes: #7592 for X87 PR-URL: #7638 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
1 parent e5cce7a commit 2870061
Copy full SHA for 2870061

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎deps/v8/src/x87/code-stubs-x87.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/x87/code-stubs-x87.cc
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,6 +1835,11 @@ void InstanceOfStub::Generate(MacroAssembler* masm) {
18351835
__ CmpObjectType(function, JS_FUNCTION_TYPE, function_map);
18361836
__ j(not_equal, &slow_case);
18371837

1838+
// Go to the runtime if the function is not a constructor.
1839+
__ test_b(FieldOperand(function_map, Map::kBitFieldOffset),
1840+
static_cast<uint8_t>(1 << Map::kIsConstructor));
1841+
__ j(zero, &slow_case);
1842+
18381843
// Ensure that {function} has an instance prototype.
18391844
__ test_b(FieldOperand(function_map, Map::kBitFieldOffset),
18401845
static_cast<uint8_t>(1 << Map::kHasNonInstancePrototype));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.