Commit Graph

5 Commits

Author SHA1 Message Date
ager@chromium.org
a01b45df58 Fix a number of tests that incorrectly used assertUnreachable.
Our testing infrastructure uses exceptions to indicate
errors. assertUnreachable therefore throws an exception to indicate
that it was reached. Therefore, it cannot be used to check that an
exception was thrown using the pattern:

try {
  shouldThrow();
  assertUnreachable();
} catch(e) {
}

Such a test will always pass because assertUnreachable will throw an
exception if shouldThrow does not.

R=ricow@chromium.org

Review URL: http://codereview.chromium.org/7053035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 08:08:42 +00:00
ricow@chromium.org
fb6d7e17df Follow jsc on not throwing when trying to add a property to a non-extensible object.
This change makes us compatible with Safari on not throwing when trying to add a property to a non-extensible object. 
Review URL: http://codereview.chromium.org/6712059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-28 06:11:08 +00:00
sgjesse@chromium.org
a1a3aa46a2 Object.seal(obj) and Object.freeze(obj) should return the input obj.
BUG=http://code.google.com/p/v8/issues/detail?id=809
TEST=Seal/freeze an object and check if Object.seal and Object.freeze returns the given object.

Burcu Dogan <burcujdogan@gmail.com>

Review URL: http://codereview.chromium.org/3056049


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 10:56:15 +00:00
ricow@chromium.org
e2fab5fd9f Fix bug in Object.isFrozen which always classifies non-extensible objects as frozen.
Since out internal representation of a property descriptor does not have configurable and writable 
attributes Object.isFrozen returns true whenever an object is not extensible.
This change makes use of the right method calls on our internal representation (isWritable() and 
isConfigurable()). Tests added directly to the mjsunit test.


Review URL: http://codereview.chromium.org/2904015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 13:15:43 +00:00
ricow@chromium.org
325fd42c3f Add ES5 Object.freeze and Object.isFrozen methods.
This change adds ES5 15.2.3.9 Object.freeze and 
15.2.3.12 Object.isFrozen

Review URL: http://codereview.chromium.org/2944016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 12:58:02 +00:00