[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
barraclough at apple.com
barraclough at apple.com
Fri Feb 26 22:16:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 330666766d721968638b35b3d4ac1ddc620a9c2e
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 9 23:26:56 2010 +0000
Rubber Stamped by Geoff Garen.
Rename StringBuilder::release && JSStringBuilder::releaseJSString
to 'build()'.
JavaScriptCore:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::paramString):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
* runtime/JSONObject.cpp:
(JSC::Stringifier::stringify):
* runtime/JSStringBuilder.h:
(JSC::JSStringBuilder::build):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::Lexer::lexString):
* runtime/NumberPrototype.cpp:
(JSC::integerPartNoExp):
(JSC::numberProtoFuncToFixed):
* runtime/StringBuilder.h:
(JSC::StringBuilder::build):
WebCore:
* bindings/js/ScriptString.h:
(WebCore::ScriptString::operator+=):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 553350c..2cd98b8 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,34 @@
+2010-02-09 Gavin Barraclough <barraclough at apple.com>
+
+ Rubber Stamped by Geoff Garen.
+
+ Rename StringBuilder::release && JSStringBuilder::releaseJSString
+ to 'build()'.
+
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncToLocaleString):
+ (JSC::arrayProtoFuncJoin):
+ * runtime/Executable.cpp:
+ (JSC::FunctionExecutable::paramString):
+ * runtime/FunctionConstructor.cpp:
+ (JSC::constructFunction):
+ * runtime/JSGlobalObjectFunctions.cpp:
+ (JSC::encode):
+ (JSC::decode):
+ (JSC::globalFuncEscape):
+ (JSC::globalFuncUnescape):
+ * runtime/JSONObject.cpp:
+ (JSC::Stringifier::stringify):
+ * runtime/JSStringBuilder.h:
+ (JSC::JSStringBuilder::build):
+ * runtime/LiteralParser.cpp:
+ (JSC::LiteralParser::Lexer::lexString):
+ * runtime/NumberPrototype.cpp:
+ (JSC::integerPartNoExp):
+ (JSC::numberProtoFuncToFixed):
+ * runtime/StringBuilder.h:
+ (JSC::StringBuilder::build):
+
2010-02-09 John Sullivan <sullivan at apple.com>
https://bugs.webkit.org/show_bug.cgi?id=34772
diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp
index 26c2ee2..b64abad 100644
--- a/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -244,7 +244,7 @@ JSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState* exec, JSObject*, J
}
}
arrayVisitedElements.remove(thisObj);
- return strBuffer.releaseJSString(exec);
+ return strBuffer.build(exec);
}
JSValue JSC_HOST_CALL arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
@@ -281,7 +281,7 @@ JSValue JSC_HOST_CALL arrayProtoFuncJoin(ExecState* exec, JSObject*, JSValue thi
strBuffer.append(element.toString(exec));
}
arrayVisitedElements.remove(thisObj);
- return strBuffer.releaseJSString(exec);
+ return strBuffer.build(exec);
}
JSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
diff --git a/JavaScriptCore/runtime/Executable.cpp b/JavaScriptCore/runtime/Executable.cpp
index bc18cc9..79900dc 100644
--- a/JavaScriptCore/runtime/Executable.cpp
+++ b/JavaScriptCore/runtime/Executable.cpp
@@ -272,7 +272,7 @@ UString FunctionExecutable::paramString() const
builder.append(", ");
builder.append(parameters[pos].ustring());
}
- return builder.release();
+ return builder.build();
}
};
diff --git a/JavaScriptCore/runtime/FunctionConstructor.cpp b/JavaScriptCore/runtime/FunctionConstructor.cpp
index 9d55dd1..9b0b1bb 100644
--- a/JavaScriptCore/runtime/FunctionConstructor.cpp
+++ b/JavaScriptCore/runtime/FunctionConstructor.cpp
@@ -89,7 +89,7 @@ JSObject* constructFunction(ExecState* exec, const ArgList& args, const Identifi
builder.append(") { ");
builder.append(args.at(args.size() - 1).toString(exec));
builder.append("\n})");
- program = builder.release();
+ program = builder.build();
}
int errLine;
diff --git a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
index b1c5f51..3ddac7c 100644
--- a/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
+++ b/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
@@ -69,7 +69,7 @@ static JSValue encode(ExecState* exec, const ArgList& args, const char* doNotEsc
builder.append(tmp);
}
}
- return builder.releaseJSString(exec);
+ return builder.build(exec);
}
static JSValue decode(ExecState* exec, const ArgList& args, const char* doNotUnescape, bool strict)
@@ -135,7 +135,7 @@ static JSValue decode(ExecState* exec, const ArgList& args, const char* doNotUne
k++;
builder.append(c);
}
- return builder.releaseJSString(exec);
+ return builder.build(exec);
}
bool isStrWhiteSpace(UChar c)
@@ -396,7 +396,7 @@ JSValue JSC_HOST_CALL globalFuncEscape(ExecState* exec, JSObject*, JSValue, cons
}
}
- return builder.releaseJSString(exec);
+ return builder.build(exec);
}
JSValue JSC_HOST_CALL globalFuncUnescape(ExecState* exec, JSObject*, JSValue, const ArgList& args)
@@ -423,7 +423,7 @@ JSValue JSC_HOST_CALL globalFuncUnescape(ExecState* exec, JSObject*, JSValue, co
builder.append(*c);
}
- return jsString(exec, builder.release());
+ return jsString(exec, builder.build());
}
#ifndef NDEBUG
diff --git a/JavaScriptCore/runtime/JSONObject.cpp b/JavaScriptCore/runtime/JSONObject.cpp
index ce0dcff..acd9280 100644
--- a/JavaScriptCore/runtime/JSONObject.cpp
+++ b/JavaScriptCore/runtime/JSONObject.cpp
@@ -268,7 +268,7 @@ JSValue Stringifier::stringify(JSValue value)
if (m_exec->hadException())
return jsNull();
- return jsString(m_exec, result.release());
+ return jsString(m_exec, result.build());
}
void Stringifier::appendQuotedString(StringBuilder& builder, const UString& value)
diff --git a/JavaScriptCore/runtime/JSStringBuilder.h b/JavaScriptCore/runtime/JSStringBuilder.h
index bbf604b..2b11736 100644
--- a/JavaScriptCore/runtime/JSStringBuilder.h
+++ b/JavaScriptCore/runtime/JSStringBuilder.h
@@ -34,13 +34,25 @@ namespace JSC {
class JSStringBuilder : public StringBuilder {
public:
- JSValue releaseJSString(ExecState* exec)
+ JSValue build(ExecState* exec)
{
buffer.shrinkToFit();
if (!buffer.data())
return throwOutOfMemoryError(exec);
return jsString(exec, UString::adopt(buffer));
}
+
+private:
+ // Make attempts to call this compile error - if you only wanted a UString,
+ // Why didn't you just use a StringBuilder?! (This may change, maybe at some
+ // point in the future we'll need to start building a string not knowing whether
+ // we'll want a UString or a JSValue - but until we have this requirement,
+ // block this).
+ UString build()
+ {
+ ASSERT_NOT_REACHED();
+ return StringBuilder::build();
+ }
};
template<typename StringType1, typename StringType2>
diff --git a/JavaScriptCore/runtime/LiteralParser.cpp b/JavaScriptCore/runtime/LiteralParser.cpp
index aa1e5ed..cc33bae 100644
--- a/JavaScriptCore/runtime/LiteralParser.cpp
+++ b/JavaScriptCore/runtime/LiteralParser.cpp
@@ -200,7 +200,7 @@ template <LiteralParser::ParserMode mode> inline LiteralParser::TokenType Litera
if (m_ptr >= m_end || *m_ptr != '"')
return TokError;
- token.stringToken = builder.release();
+ token.stringToken = builder.build();
token.type = TokString;
token.end = ++m_ptr;
return TokString;
diff --git a/JavaScriptCore/runtime/NumberPrototype.cpp b/JavaScriptCore/runtime/NumberPrototype.cpp
index 6f22aca..fa32b86 100644
--- a/JavaScriptCore/runtime/NumberPrototype.cpp
+++ b/JavaScriptCore/runtime/NumberPrototype.cpp
@@ -95,7 +95,7 @@ static UString integerPartNoExp(double d)
builder.append((const char*)(buf.data()));
}
- return builder.release();
+ return builder.build();
}
static UString charSequence(char c, int count)
@@ -263,7 +263,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue
for (int i = 0; i < f + 1 - k; i++)
z.append('0');
z.append(m);
- m = z.release();
+ m = z.build();
k = f + 1;
ASSERT(k == m.size());
}
diff --git a/JavaScriptCore/runtime/StringBuilder.h b/JavaScriptCore/runtime/StringBuilder.h
index 6bfa0c4..27dbbd7 100644
--- a/JavaScriptCore/runtime/StringBuilder.h
+++ b/JavaScriptCore/runtime/StringBuilder.h
@@ -66,10 +66,10 @@ public:
UChar operator[](size_t i) const { return buffer.at(i); }
- UString release()
+ UString build()
{
buffer.shrinkToFit();
- if (!buffer.data())
+ if (buffer.size() && !buffer.data())
CRASH();
return UString::adopt(buffer);
}
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2229c69..077d118 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-09 Gavin Barraclough <barraclough at apple.com>
+
+ Rubber Stamped by Geoff Garen.
+
+ Rename StringBuilder::release && JSStringBuilder::releaseJSString
+ to 'build()'.
+
+ * bindings/js/ScriptString.h:
+ (WebCore::ScriptString::operator+=):
+
2010-02-09 Dan Bernstein <mitz at apple.com>
Reviewed by Anders Carlsson.
diff --git a/WebCore/bindings/js/ScriptString.h b/WebCore/bindings/js/ScriptString.h
index a33d639..18964b8 100644
--- a/WebCore/bindings/js/ScriptString.h
+++ b/WebCore/bindings/js/ScriptString.h
@@ -61,7 +61,7 @@ public:
JSC::StringBuilder buffer;
buffer.append(m_str);
buffer.append(s);
- m_str = buffer.release();
+ m_str = buffer.build();
return *this;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list