Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (184290 => 184291)
--- trunk/Source/_javascript_Core/ChangeLog 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-05-13 18:51:44 UTC (rev 184291)
@@ -1,3 +1,47 @@
+2015-05-13 Joseph Pecoraro <[email protected]>
+
+ Pass String as reference in more places
+ https://bugs.webkit.org/show_bug.cgi?id=144769
+
+ Reviewed by Daniel Bates.
+
+ * debugger/Breakpoint.h:
+ (JSC::Breakpoint::Breakpoint):
+ * parser/Parser.h:
+ (JSC::Parser::setErrorMessage):
+ (JSC::Parser::updateErrorWithNameAndMessage):
+ * parser/ParserError.h:
+ (JSC::ParserError::ParserError):
+ * runtime/RegExp.cpp:
+ (JSC::RegExpFunctionalTestCollector::outputOneTest):
+ * runtime/RegExpObject.cpp:
+ (JSC::regExpObjectSourceInternal):
+ * runtime/TypeProfiler.cpp:
+ (JSC::TypeProfiler::typeInformationForExpressionAtOffset):
+ * runtime/TypeProfilerLog.cpp:
+ (JSC::TypeProfilerLog::processLogEntries):
+ * runtime/TypeProfilerLog.h:
+ * tools/FunctionOverrides.cpp:
+ (JSC::initializeOverrideInfo):
+ * inspector/scripts/codegen/generate_objc_conversion_helpers.py:
+ (ObjCConversionHelpersGenerator._generate_enum_from_protocol_string):
+
+ * inspector/scripts/codegen/objc_generator_templates.py:
+ * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
+ * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
+ * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
+ * inspector/scripts/tests/expected/enum-values.json-result:
+ * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
+ * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
+ * inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
+ * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
+ * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
+ * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
+ * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
+ * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
+ * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
+ Rebaseline tests after updating the generator.
+
2015-05-13 Michael Saboff <[email protected]>
com.apple.WebKit.WebContent crashed at _javascript_Core: JSC::CodeBlock::finalizeUnconditionally
Modified: trunk/Source/_javascript_Core/debugger/Breakpoint.h (184290 => 184291)
--- trunk/Source/_javascript_Core/debugger/Breakpoint.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/debugger/Breakpoint.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -43,7 +43,7 @@
{
}
- Breakpoint(SourceID sourceID, unsigned line, unsigned column, String condition, bool autoContinue)
+ Breakpoint(SourceID sourceID, unsigned line, unsigned column, const String& condition, bool autoContinue)
: id(noBreakpointID)
, sourceID(sourceID)
, line(line)
Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_conversion_helpers.py (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_conversion_helpers.py 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/generate_objc_conversion_helpers.py 2015-05-13 18:51:44 UTC (rev 184291)
@@ -144,7 +144,7 @@
def _generate_enum_from_protocol_string(self, objc_enum_name, enum_values):
lines = []
lines.append('template<>')
- lines.append('inline %s fromProtocolString(String value)' % objc_enum_name)
+ lines.append('inline %s fromProtocolString(const String& value)' % objc_enum_name)
lines.append('{')
for enum_value in enum_values:
lines.append(' if (value == "%s")' % enum_value)
Modified: trunk/Source/_javascript_Core/inspector/scripts/codegen/objc_generator_templates.py (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/codegen/objc_generator_templates.py 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/codegen/objc_generator_templates.py 2015-05-13 18:51:44 UTC (rev 184291)
@@ -55,7 +55,7 @@
ConversionHelpersStandard = (
"""template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);""")
+ObjCEnumType fromProtocolString(const String& value);""")
BackendDispatcherHeaderPrelude = (
"""${includes}
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-async-attribute.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -1226,7 +1226,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
inline String toProtocolString(RWIProtocolDatabasePrimaryColors value)
@@ -1242,7 +1242,7 @@
}
template<>
-inline RWIProtocolDatabasePrimaryColors fromProtocolString(String value)
+inline RWIProtocolDatabasePrimaryColors fromProtocolString(const String& value)
{
if (value == "red")
return RWIProtocolDatabasePrimaryColorsRed;
@@ -1269,7 +1269,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteSQLSyncOptionalReturnValuesPrintColorCyan;
@@ -1298,7 +1298,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteSQLAsyncOptionalReturnValuesPrintColorCyan;
@@ -1327,7 +1327,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteSQLSyncPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteSQLSyncPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteSQLSyncPrintColorCyan;
@@ -1356,7 +1356,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteSQLAsyncPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteSQLAsyncPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteSQLAsyncPrintColorCyan;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -1077,7 +1077,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
inline String toProtocolString(RWIProtocolDatabasePrimaryColors value)
@@ -1093,7 +1093,7 @@
}
template<>
-inline RWIProtocolDatabasePrimaryColors fromProtocolString(String value)
+inline RWIProtocolDatabasePrimaryColors fromProtocolString(const String& value)
{
if (value == "red")
return RWIProtocolDatabasePrimaryColorsRed;
@@ -1120,7 +1120,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteAllOptionalParametersPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteAllOptionalParametersPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan;
@@ -1149,7 +1149,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteAllOptionalParametersPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteAllOptionalParametersPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan;
@@ -1178,7 +1178,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteNoOptionalParametersPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteNoOptionalParametersPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan;
@@ -1207,7 +1207,7 @@
}
template<>
-inline RWIProtocolDatabaseExecuteNoOptionalParametersPrintColor fromProtocolString(String value)
+inline RWIProtocolDatabaseExecuteNoOptionalParametersPrintColor fromProtocolString(const String& value)
{
if (value == "cyan")
return RWIProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -1103,7 +1103,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/enum-values.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/enum-values.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/enum-values.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -835,7 +835,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
inline String toProtocolString(RWIProtocolTypeDomainEnum value)
@@ -853,7 +853,7 @@
}
template<>
-inline RWIProtocolTypeDomainEnum fromProtocolString(String value)
+inline RWIProtocolTypeDomainEnum fromProtocolString(const String& value)
{
if (value == "shared")
return RWIProtocolTypeDomainEnumShared;
@@ -883,7 +883,7 @@
}
template<>
-inline RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue fromProtocolString(String value)
+inline RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue fromProtocolString(const String& value)
{
if (value == "shared")
return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared;
@@ -911,7 +911,7 @@
}
template<>
-inline RWIProtocolEventDomainEventWithEnumParameterParameter fromProtocolString(String value)
+inline RWIProtocolEventDomainEventWithEnumParameterParameter fromProtocolString(const String& value)
{
if (value == "shared")
return RWIProtocolEventDomainEventWithEnumParameterParameterShared;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/events-with-optional-parameters.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -784,7 +784,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -881,7 +881,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/same-type-id-different-domain.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/same-type-id-different-domain.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/same-type-id-different-domain.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -646,7 +646,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -715,7 +715,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
inline String toProtocolString(RWIProtocolRuntimeKeyPathType value)
@@ -731,7 +731,7 @@
}
template<>
-inline RWIProtocolRuntimeKeyPathType fromProtocolString(String value)
+inline RWIProtocolRuntimeKeyPathType fromProtocolString(const String& value)
{
if (value == "null")
return RWIProtocolRuntimeKeyPathTypeNull;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -637,7 +637,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-array-type.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-array-type.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-array-type.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -669,7 +669,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
inline String toProtocolString(RWIProtocolDebuggerReason value)
@@ -685,7 +685,7 @@
}
template<>
-inline RWIProtocolDebuggerReason fromProtocolString(String value)
+inline RWIProtocolDebuggerReason fromProtocolString(const String& value)
{
if (value == "Died")
return RWIProtocolDebuggerReasonDied;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-enum-type.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-enum-type.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-enum-type.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -666,7 +666,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
inline String toProtocolString(RWIProtocolRuntimeFarmAnimals value)
@@ -684,7 +684,7 @@
}
template<>
-inline RWIProtocolRuntimeFarmAnimals fromProtocolString(String value)
+inline RWIProtocolRuntimeFarmAnimals fromProtocolString(const String& value)
{
if (value == "Pigs")
return RWIProtocolRuntimeFarmAnimalsPigs;
@@ -713,7 +713,7 @@
}
template<>
-inline RWIProtocolRuntimeTwoLeggedAnimals fromProtocolString(String value)
+inline RWIProtocolRuntimeTwoLeggedAnimals fromProtocolString(const String& value)
{
if (value == "Ducks")
return RWIProtocolRuntimeTwoLeggedAnimalsDucks;
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-declaration-object-type.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -1106,7 +1106,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
Modified: trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result (184290 => 184291)
--- trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result 2015-05-13 18:51:44 UTC (rev 184291)
@@ -993,7 +993,7 @@
namespace Inspector {
template<typename ObjCEnumType>
-ObjCEnumType fromProtocolString(String value);
+ObjCEnumType fromProtocolString(const String& value);
inline String toProtocolString(RWIProtocolTestUncastedAnimals value)
@@ -1011,7 +1011,7 @@
}
template<>
-inline RWIProtocolTestUncastedAnimals fromProtocolString(String value)
+inline RWIProtocolTestUncastedAnimals fromProtocolString(const String& value)
{
if (value == "Pigs")
return RWIProtocolTestUncastedAnimalsPigs;
@@ -1040,7 +1040,7 @@
}
template<>
-inline RWIProtocolTestCastedAnimals fromProtocolString(String value)
+inline RWIProtocolTestCastedAnimals fromProtocolString(const String& value)
{
if (value == "Ducks")
return RWIProtocolTestCastedAnimalsDucks;
Modified: trunk/Source/_javascript_Core/parser/Parser.h (184290 => 184291)
--- trunk/Source/_javascript_Core/parser/Parser.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/parser/Parser.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -653,9 +653,9 @@
return m_token.m_location;
}
- void setErrorMessage(String msg)
+ void setErrorMessage(const String& message)
{
- m_errorMessage = msg;
+ m_errorMessage = message;
}
NEVER_INLINE void logError(bool);
@@ -667,9 +667,9 @@
template <typename A, typename B, typename C, typename D, typename E, typename F> NEVER_INLINE void logError(bool, const A&, const B&, const C&, const D&, const E&, const F&);
template <typename A, typename B, typename C, typename D, typename E, typename F, typename G> NEVER_INLINE void logError(bool, const A&, const B&, const C&, const D&, const E&, const F&, const G&);
- NEVER_INLINE void updateErrorWithNameAndMessage(const char* beforeMsg, String name, const char* afterMsg)
+ NEVER_INLINE void updateErrorWithNameAndMessage(const char* beforeMessage, const String& name, const char* afterMessage)
{
- m_errorMessage = makeString(beforeMsg, " '", name, "' ", afterMsg);
+ m_errorMessage = makeString(beforeMessage, " '", name, "' ", afterMessage);
}
NEVER_INLINE void updateErrorMessage(const char* msg)
Modified: trunk/Source/_javascript_Core/parser/ParserError.h (184290 => 184291)
--- trunk/Source/_javascript_Core/parser/ParserError.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/parser/ParserError.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -70,7 +70,7 @@
{
}
- ParserError(ErrorType type, SyntaxErrorType syntaxError, JSToken token, String msg, int line)
+ ParserError(ErrorType type, SyntaxErrorType syntaxError, JSToken token, const String& msg, int line)
: m_token(token)
, m_message(msg)
, m_line(line)
Modified: trunk/Source/_javascript_Core/runtime/RegExp.cpp (184290 => 184291)
--- trunk/Source/_javascript_Core/runtime/RegExp.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/runtime/RegExp.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -113,7 +113,7 @@
return s_instance;
}
-void RegExpFunctionalTestCollector::outputOneTest(RegExp* regExp, String s, int startOffset, int* ovector, int result)
+void RegExpFunctionalTestCollector::outputOneTest(RegExp* regExp, const String& s, int startOffset, int* ovector, int result)
{
if ((!m_lastRegExp) || (m_lastRegExp != regExp)) {
m_lastRegExp = regExp;
Modified: trunk/Source/_javascript_Core/runtime/RegExpObject.cpp (184290 => 184291)
--- trunk/Source/_javascript_Core/runtime/RegExpObject.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/runtime/RegExpObject.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -199,7 +199,7 @@
}
template <typename CharacterType>
-static inline JSValue regExpObjectSourceInternal(ExecState* exec, String pattern, const CharacterType* characters, unsigned length)
+static inline JSValue regExpObjectSourceInternal(ExecState* exec, const String& pattern, const CharacterType* characters, unsigned length)
{
bool previousCharacterWasBackslash = false;
bool inBrackets = false;
Modified: trunk/Source/_javascript_Core/runtime/TypeProfiler.cpp (184290 => 184291)
--- trunk/Source/_javascript_Core/runtime/TypeProfiler.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/runtime/TypeProfiler.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -101,7 +101,6 @@
else
json.appendLiteral("false");
-
json.append('}');
return json.toString();
Modified: trunk/Source/_javascript_Core/runtime/TypeProfilerLog.cpp (184290 => 184291)
--- trunk/Source/_javascript_Core/runtime/TypeProfilerLog.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/runtime/TypeProfilerLog.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -52,7 +52,7 @@
delete[] m_logStartPtr;
}
-void TypeProfilerLog::processLogEntries(String reason)
+void TypeProfilerLog::processLogEntries(const String& reason)
{
if (verbose)
dataLog("Process caller:'", reason, "'");
Modified: trunk/Source/_javascript_Core/runtime/TypeProfilerLog.h (184290 => 184291)
--- trunk/Source/_javascript_Core/runtime/TypeProfilerLog.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/runtime/TypeProfilerLog.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -63,7 +63,7 @@
~TypeProfilerLog();
- JS_EXPORT_PRIVATE void processLogEntries(String);
+ JS_EXPORT_PRIVATE void processLogEntries(const String&);
LogEntry* logEndPtr() const { return m_logEndPtr; }
static ptrdiff_t logStartOffset() { return OBJECT_OFFSETOF(TypeProfilerLog, m_logStartPtr); }
Modified: trunk/Source/_javascript_Core/tools/FunctionOverrides.cpp (184290 => 184291)
--- trunk/Source/_javascript_Core/tools/FunctionOverrides.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/_javascript_Core/tools/FunctionOverrides.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -104,7 +104,7 @@
parseOverridesInFile(overridesFileName);
}
-static void initializeOverrideInfo(const SourceCode& origCode, String newBody, FunctionOverrides::OverrideInfo& info)
+static void initializeOverrideInfo(const SourceCode& origCode, const String& newBody, FunctionOverrides::OverrideInfo& info)
{
String origProviderStr = origCode.provider()->source();
unsigned origBraceStart = origCode.startOffset();
Modified: trunk/Source/WebCore/ChangeLog (184290 => 184291)
--- trunk/Source/WebCore/ChangeLog 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/ChangeLog 2015-05-13 18:51:44 UTC (rev 184291)
@@ -1,3 +1,24 @@
+2015-05-13 Joseph Pecoraro <[email protected]>
+
+ Pass String as reference in more places
+ https://bugs.webkit.org/show_bug.cgi?id=144769
+
+ Reviewed by Daniel Bates.
+
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::CloneSerializer::dumpString):
+ (WebCore::CloneSerializer::dumpStringObject):
+ * dom/DocumentMarkerController.cpp:
+ (WebCore::DocumentMarkerController::addMarker):
+ * dom/DocumentMarkerController.h:
+ * inspector/InspectorApplicationCacheAgent.cpp:
+ (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
+ * inspector/InspectorApplicationCacheAgent.h:
+ * inspector/InspectorNodeFinder.cpp:
+ (WebCore::stripCharacters):
+ (WebCore::InspectorNodeFinder::InspectorNodeFinder):
+ * inspector/InspectorNodeFinder.h:
+
2015-05-13 Timothy Horton <[email protected]>
View scale changes are temporarily lost after restoring a page from the page cache
Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (184290 => 184291)
--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -681,23 +681,23 @@
}
}
- void dumpString(String str)
+ void dumpString(const String& string)
{
- if (str.isEmpty())
+ if (string.isEmpty())
write(EmptyStringTag);
else {
write(StringTag);
- write(str);
+ write(string);
}
}
- void dumpStringObject(String str)
+ void dumpStringObject(const String& string)
{
- if (str.isEmpty())
+ if (string.isEmpty())
write(EmptyStringObjectTag);
else {
write(StringObjectTag);
- write(str);
+ write(string);
}
}
Modified: trunk/Source/WebCore/dom/DocumentMarkerController.cpp (184290 => 184291)
--- trunk/Source/WebCore/dom/DocumentMarkerController.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -108,7 +108,7 @@
}
#if PLATFORM(IOS)
-void DocumentMarkerController::addMarker(Range* range, DocumentMarker::MarkerType type, String description, const Vector<String>& interpretations, const RetainPtr<id>& metadata)
+void DocumentMarkerController::addMarker(Range* range, DocumentMarker::MarkerType type, const String& description, const Vector<String>& interpretations, const RetainPtr<id>& metadata)
{
// Use a TextIterator to visit the potentially multiple nodes the range covers.
for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance()) {
Modified: trunk/Source/WebCore/dom/DocumentMarkerController.h (184290 => 184291)
--- trunk/Source/WebCore/dom/DocumentMarkerController.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/dom/DocumentMarkerController.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -55,7 +55,7 @@
void addMarkerToNode(Node*, unsigned startOffset, unsigned length, DocumentMarker::MarkerType, PassRefPtr<DocumentMarkerDetails>);
WEBCORE_EXPORT void addTextMatchMarker(const Range*, bool activeMatch);
#if PLATFORM(IOS)
- void addMarker(Range*, DocumentMarker::MarkerType, String description, const Vector<String>& interpretations, const RetainPtr<id>& metadata);
+ void addMarker(Range*, DocumentMarker::MarkerType, const String& description, const Vector<String>& interpretations, const RetainPtr<id>& metadata);
void addDictationPhraseWithAlternativesMarker(Range*, const Vector<String>& interpretations);
void addDictationResultMarker(Range*, const RetainPtr<id>& metadata);
#endif
Modified: trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp (184290 => 184291)
--- trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -114,7 +114,7 @@
}
}
-DocumentLoader* InspectorApplicationCacheAgent::assertFrameWithDocumentLoader(ErrorString& errorString, String frameId)
+DocumentLoader* InspectorApplicationCacheAgent::assertFrameWithDocumentLoader(ErrorString& errorString, const String& frameId)
{
Frame* frame = m_pageAgent->assertFrame(errorString, frameId);
if (!frame)
Modified: trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.h (184290 => 184291)
--- trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -69,7 +69,7 @@
Ref<Inspector::Protocol::Array<Inspector::Protocol::ApplicationCache::ApplicationCacheResource>> buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList&);
Ref<Inspector::Protocol::ApplicationCache::ApplicationCacheResource> buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&);
- DocumentLoader* assertFrameWithDocumentLoader(ErrorString&, String frameId);
+ DocumentLoader* assertFrameWithDocumentLoader(ErrorString&, const String& frameId);
InspectorPageAgent* m_pageAgent;
std::unique_ptr<Inspector::ApplicationCacheFrontendDispatcher> m_frontendDispatcher;
Modified: trunk/Source/WebCore/inspector/InspectorNodeFinder.cpp (184290 => 184291)
--- trunk/Source/WebCore/inspector/InspectorNodeFinder.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/inspector/InspectorNodeFinder.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -42,7 +42,7 @@
namespace WebCore {
-static String stripCharacters(String string, const char startCharacter, const char endCharacter, bool& startCharFound, bool& endCharFound)
+static String stripCharacters(const String& string, const char startCharacter, const char endCharacter, bool& startCharFound, bool& endCharFound)
{
startCharFound = string.startsWith(startCharacter);
endCharFound = string.endsWith(endCharacter);
@@ -52,7 +52,7 @@
return string.substring(start, end - start);
}
-InspectorNodeFinder::InspectorNodeFinder(String whitespaceTrimmedQuery)
+InspectorNodeFinder::InspectorNodeFinder(const String& whitespaceTrimmedQuery)
: m_whitespaceTrimmedQuery(whitespaceTrimmedQuery)
{
m_tagNameQuery = stripCharacters(whitespaceTrimmedQuery, '<', '>', m_startTagFound, m_endTagFound);
Modified: trunk/Source/WebCore/inspector/InspectorNodeFinder.h (184290 => 184291)
--- trunk/Source/WebCore/inspector/InspectorNodeFinder.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebCore/inspector/InspectorNodeFinder.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -42,7 +42,7 @@
class InspectorNodeFinder {
public:
- InspectorNodeFinder(String whitespaceTrimmedQuery);
+ InspectorNodeFinder(const String& whitespaceTrimmedQuery);
void performSearch(Node*);
const ListHashSet<Node*>& results() const { return m_results; }
Modified: trunk/Source/WebKit2/ChangeLog (184290 => 184291)
--- trunk/Source/WebKit2/ChangeLog 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebKit2/ChangeLog 2015-05-13 18:51:44 UTC (rev 184291)
@@ -1,3 +1,14 @@
+2015-05-13 Joseph Pecoraro <[email protected]>
+
+ Pass String as reference in more places
+ https://bugs.webkit.org/show_bug.cgi?id=144769
+
+ Reviewed by Daniel Bates.
+
+ * WebProcess/WebPage/WebInspectorUI.cpp:
+ (WebKit::WebInspectorUI::showMainResourceForFrame):
+ * WebProcess/WebPage/WebInspectorUI.h:
+
2015-05-13 Timothy Horton <[email protected]>
View scale changes are temporarily lost after restoring a page from the page cache
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp (184290 => 184291)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp 2015-05-13 18:51:44 UTC (rev 184291)
@@ -215,7 +215,7 @@
evaluateCommandOnLoad(ASCIILiteral("showResources"));
}
-void WebInspectorUI::showMainResourceForFrame(String frameIdentifier)
+void WebInspectorUI::showMainResourceForFrame(const String& frameIdentifier)
{
evaluateCommandOnLoad(ASCIILiteral("showMainResourceForFrame"), frameIdentifier);
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h (184290 => 184291)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h 2015-05-13 18:11:38 UTC (rev 184290)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h 2015-05-13 18:51:44 UTC (rev 184291)
@@ -57,7 +57,7 @@
void showConsole();
void showResources();
- void showMainResourceForFrame(String frameIdentifier);
+ void showMainResourceForFrame(const String& frameIdentifier);
void startPageProfiling();
void stopPageProfiling();