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

Unified Diff: src/runtime.cc

Issue 290733008: Teach OrderedHashSet::Remove to report whether it actually removed anything (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/objects.cc ('k') | test/cctest/test-ordered-hash-table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index c3610fbe3ffb6df22c959dd2384d79759cc3011c..568ce3158089929004a5803de899f7588e30620e 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1554,9 +1554,10 @@ RUNTIME_FUNCTION(Runtime_SetDelete) {
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
- table = OrderedHashSet::Remove(table, key);
+ bool was_present = false;
+ table = OrderedHashSet::Remove(table, key, &was_present);
holder->set_table(*table);
- return isolate->heap()->undefined_value();
+ return isolate->heap()->ToBoolean(was_present);
}
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-ordered-hash-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698