Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: test/cctest/test-api.cc

Issue 2044843002: GetHash and friends: return a raw pointer instead of Handle<Smi> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebasing again.... Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-collections.cc ('k') | test/cctest/test-dictionary.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index d71011668790a0d6c9eee526c2b960f27069344c..4712b0a26dcda64d5f95b0e29ed77326ff7a16aa 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -2827,16 +2827,15 @@ void GlobalProxyIdentityHash(bool set_in_js) {
CHECK(env->Global()
->Set(env.local(), v8_str("global"), global_proxy)
.FromJust());
- i::Handle<i::Object> original_hash;
+ int32_t hash1;
if (set_in_js) {
CompileRun("var m = new Set(); m.add(global);");
- original_hash = i::Handle<i::Object>(i_global_proxy->GetHash(), i_isolate);
+ i::Object* original_hash = i_global_proxy->GetHash();
+ CHECK(original_hash->IsSmi());
+ hash1 = i::Smi::cast(original_hash)->value();
} else {
- original_hash = i::Handle<i::Object>(
- i::Object::GetOrCreateHash(i_isolate, i_global_proxy));
+ hash1 = i::Object::GetOrCreateHash(i_isolate, i_global_proxy)->value();
}
- CHECK(original_hash->IsSmi());
- int32_t hash1 = i::Handle<i::Smi>::cast(original_hash)->value();
// Hash should be retained after being detached.
env->DetachGlobal();
int hash2 = global_proxy->GetIdentityHash();
« no previous file with comments | « src/runtime/runtime-collections.cc ('k') | test/cctest/test-dictionary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698