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

Unified Diff: src/collection.js

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 | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index 94125fb89956caf6c7eb0b3f69060962c20fcb8f..e2cda595d845e0dc89a58e7e11a560f901c6821c 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -47,12 +47,7 @@ function SetDeleteJS(key) {
throw MakeTypeError('incompatible_method_receiver',
['Set.prototype.delete', this]);
}
- if (%SetHas(this, key)) {
- %SetDelete(this, key);
- return true;
- } else {
- return false;
- }
+ return %SetDelete(this, key);
}
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698