New issue
Advanced search Search tips

Issue 5487 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
HW: ----
NextAction: ----
OS: ----
Priority: 2
Type: Bug

Blocking:
issue 1569



Sign in to add a comment

Object.hasOwnProperty is incorrect on module namespace objects

Project Member Reported by neis@chromium.org, Oct 6 2016

Issue description

hasOwnProperty is specced to use [[GetOwnProperty]], which will throw
for properties on namespace objects that haven't been initialized yet.
In our runtime, however, hasOwnProperty takes a shortcut for JSObjects,
leading to a different result in that case.
 
Labels: Priority-2
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e

commit ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e
Author: Georg Neis <neis@chromium.org>
Date: Tue Jul 25 12:09:41 2017

[modules] Fix Object.prototype.hasOwnProperty on namespace objects.

This must throw for uninitialized properties.

R=adamk@chromium.org

Bug:  v8:1569 ,  v8:5487 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I8beb8bf6a197870eb5c038102ab474dd12f6b6eb
Reviewed-on: https://chromium-review.googlesource.com/582013
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46870}
[modify] https://crrev.com/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e/include/v8.h
[modify] https://crrev.com/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e/src/objects-inl.h
[modify] https://crrev.com/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e/src/objects.cc
[modify] https://crrev.com/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e/src/objects.h
[modify] https://crrev.com/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e/src/runtime/runtime-object.cc
[modify] https://crrev.com/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e/test/test262/test262.status
[modify] https://crrev.com/ddec1c4f57a94f5e0450e70c98c1b5d2d5f0d46e/tools/v8heapconst.py

Comment 3 by neis@chromium.org, Jul 25 2017

Status: Fixed (was: Assigned)

Sign in to add a comment