summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-weakmaps.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-weakmaps.cc')
-rw-r--r--deps/v8/test/cctest/test-weakmaps.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/deps/v8/test/cctest/test-weakmaps.cc b/deps/v8/test/cctest/test-weakmaps.cc
index 31b812e287..2fd546d526 100644
--- a/deps/v8/test/cctest/test-weakmaps.cc
+++ b/deps/v8/test/cctest/test-weakmaps.cc
@@ -25,6 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// TODO(mythria): Remove this after this flag is turned on globally
+#define V8_IMMINENT_DEPRECATION_WARNINGS
+
#include <utility>
#include "src/v8.h"
@@ -89,9 +92,9 @@ TEST(Weakness) {
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
Handle<Smi> smi(Smi::FromInt(23), isolate);
int32_t hash = Object::GetOrCreateHash(isolate, key)->value();
- Runtime::WeakCollectionSet(weakmap, key, object, hash);
+ JSWeakCollection::Set(weakmap, key, object, hash);
int32_t object_hash = Object::GetOrCreateHash(isolate, object)->value();
- Runtime::WeakCollectionSet(weakmap, object, smi, object_hash);
+ JSWeakCollection::Set(weakmap, object, smi, object_hash);
}
CHECK_EQ(2, ObjectHashTable::cast(weakmap->table())->NumberOfElements());
@@ -147,7 +150,7 @@ TEST(Shrinking) {
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
Handle<Smi> smi(Smi::FromInt(i), isolate);
int32_t object_hash = Object::GetOrCreateHash(isolate, object)->value();
- Runtime::WeakCollectionSet(weakmap, object, smi, object_hash);
+ JSWeakCollection::Set(weakmap, object, smi, object_hash);
}
}
@@ -196,7 +199,7 @@ TEST(Regress2060a) {
CHECK(!heap->InNewSpace(object->address()));
CHECK(!first_page->Contains(object->address()));
int32_t hash = Object::GetOrCreateHash(isolate, key)->value();
- Runtime::WeakCollectionSet(weakmap, key, object, hash);
+ JSWeakCollection::Set(weakmap, key, object, hash);
}
}
@@ -239,7 +242,7 @@ TEST(Regress2060b) {
for (int i = 0; i < 32; i++) {
Handle<Smi> smi(Smi::FromInt(i), isolate);
int32_t hash = Object::GetOrCreateHash(isolate, keys[i])->value();
- Runtime::WeakCollectionSet(weakmap, keys[i], smi, hash);
+ JSWeakCollection::Set(weakmap, keys[i], smi, hash);
}
// Force compacting garbage collection. The subsequent collections are used