https://codereview.chromium.org/21924007/diff/3001/src/collection.js
File src/collection.js (right):
https://codereview.chromium.org/21924007/diff/3001/src/collection.js#newcode52
src/collection.js:52: if (!IS_SET(this)) {
Remember that all of these needs to be changed to actually test that it
is an initialized Set and not just a Set.
var uninitializedSet = %NewObject(Set);
assertThrows(function() {
Set.prototype.add.call(uninitializedSet, 'key');
}, TypeError);
At this point, the only way to get an uninitialized Set is to use
%NewObject so and user code will not be able to trigger this. But once
we expose @@create this will need to be fixed.
https://codereview.chromium.org/21924007/diff/3001/src/runtime.cc
File src/runtime.cc (right):
https://codereview.chromium.org/21924007/diff/3001/src/runtime.cc#newcode914
src/runtime.cc:914: ArrayIdToTypeAndSize(arrayId, &array_type,
&element_size, &name);
Can you move this code into the error cases? The common case is that
there is no error and we can skip all this extra work just to get the
name that we are not going to use.
https://codereview.chromium.org/21924007/diff/3001/src/runtime.cc#newcode970
src/runtime.cc:970: ArrayIdToTypeAndSize(arrayId, &array_type,
&element_size, &name);
Ditto
https://codereview.chromium.org/21924007/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.