Bug 720759 - Delete the fallible EqualStrings signature when both provided strings are linear, so that callers are required to use the faster, infallible linear-strings overload. r=Ms2ger
authorJeff Walden <jwalden@mit.edu>
Tue, 24 Jan 2012 10:30:46 -0800
changeset 86506 fd742da19c524d33a08a471e7fb8be32d4a22215
parent 86505 5d572733c31ebb146365569b04d6976d62687001
child 86507 7030a479b0e3680993b5690352350f05ca7f7372
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs720759
milestone12.0a1
Bug 720759 - Delete the fallible EqualStrings signature when both provided strings are linear, so that callers are required to use the faster, infallible linear-strings overload. r=Ms2ger
js/src/jsstr.h
--- a/js/src/jsstr.h
+++ b/js/src/jsstr.h
@@ -183,16 +183,20 @@ namespace js {
 
 /*
  * Test if strings are equal. The caller can call the function even if str1
  * or str2 are not GC-allocated things.
  */
 extern bool
 EqualStrings(JSContext *cx, JSString *str1, JSString *str2, bool *result);
 
+/* Use the infallible method instead! */
+extern bool
+EqualStrings(JSContext *cx, JSLinearString *str1, JSLinearString *str2, bool *result) MOZ_DELETE;
+
 /* EqualStrings is infallible on linear strings. */
 extern bool
 EqualStrings(JSLinearString *str1, JSLinearString *str2);
 
 /*
  * Return less than, equal to, or greater than zero depending on whether
  * str1 is less than, equal to, or greater than str2.
  */