Changeset 181673 in webkit
- Timestamp:
- Mar 17, 2015, 5:07:24 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/events/window-onerror2-expected.txt (modified) (1 diff)
-
LayoutTests/fast/profiler/dead-time-expected.txt (modified) (1 diff)
-
LayoutTests/fast/profiler/inline-event-handler-expected.txt (modified) (1 diff)
-
LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt (modified) (1 diff)
-
LayoutTests/js/dom/script-start-end-locations-expected.txt (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/builtins/BuiltinExecutables.cpp (modified) (1 diff)
-
Source/JavaScriptCore/bytecode/CodeBlock.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (modified) (7 diffs)
-
Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (modified) (1 diff)
-
Source/JavaScriptCore/generate-js-builtins (modified) (1 diff)
-
Source/JavaScriptCore/parser/Parser.h (modified) (5 diffs)
-
Source/JavaScriptCore/runtime/Executable.cpp (modified) (4 diffs)
-
Source/JavaScriptCore/runtime/Executable.h (modified) (3 diffs)
-
Source/JavaScriptCore/runtime/FunctionConstructor.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/runtime/FunctionPrototype.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r181667 r181673 1 2015-03-17 Geoffrey Garen <ggaren@apple.com> 2 3 Function bodies should always include braces 4 https://bugs.webkit.org/show_bug.cgi?id=142795 5 6 Reviewed by Michael Saboff. 7 8 Updated these test results to reflect the fact that JavaScriptCore now 9 honors the source code text positions provided by WebCore, even for 10 attribute event handlers. 11 12 Unfortunately, the column numbers we used to report were wrong, and they 13 are still wrong now. The old column numbers were wrong because we would 14 always pretend that they started on column 1. The new column numbers 15 are wrong because WebCore records the column number after it finishes 16 parsing the element, rather than while it is parsing the event listener 17 attribute. 18 19 * fast/events/window-onerror2-expected.txt: 20 * fast/profiler/dead-time-expected.txt: 21 * fast/profiler/inline-event-handler-expected.txt: 22 * fast/profiler/stop-profiling-after-setTimeout-expected.txt: 23 * js/dom/script-start-end-locations-expected.txt: 24 1 25 2015-03-17 Zalan Bujtas <zalan@apple.com> 2 26 -
trunk/LayoutTests/fast/events/window-onerror2-expected.txt
r159520 r181673 2 2 3 3 Main frame window.onerror: Error: Inline script exception at window-onerror2.html, line: 34, column: 47 4 Main frame window.onerror: Exception in onload at window-onerror2.html, line: 2, column: 664 Main frame window.onerror: Exception in onload at window-onerror2.html, line: 2, column: 167 5 5 Main frame window.onerror: Error: Exception in setTimeout at window-onerror2.html, line: 29, column: 47 6 6 -
trunk/LayoutTests/fast/profiler/dead-time-expected.txt
r163140 r181673 5 5 Profile title: Dead time in profile. 6 6 Thread_1 (no file) (line 0:0) 7 onload dead-time.html (line 21: 1)7 onload dead-time.html (line 21:45) 8 8 startTest dead-time.html (line 13:1) 9 9 setTimeout (no file) (line 0:0) -
trunk/LayoutTests/fast/profiler/inline-event-handler-expected.txt
r163140 r181673 8 8 getElementById (no file) (line 0:0) 9 9 click (no file) (line 0:0) 10 onclick inline-event-handler.html (line 31:1 )10 onclick inline-event-handler.html (line 31:127) 11 11 eventListener inline-event-handler.html (line 17:26) 12 12 anonymousFunction profiler-test-JS-resources.js (line 29:37) -
trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt
r163140 r181673 5 5 Profile title: Stop profiling from a timeout 6 6 Thread_1 (no file) (line 0:0) 7 onload stop-profiling-after-setTimeout.html (line 21: 1)7 onload stop-profiling-after-setTimeout.html (line 21:45) 8 8 startTest stop-profiling-after-setTimeout.html (line 13:1) 9 9 setTimeout (no file) (line 0:0) -
trunk/LayoutTests/js/dom/script-start-end-locations-expected.txt
r159520 r181673 244 244 245 245 new Function Object: 246 function "" { 1:1 - 1:228}247 function "nf1a" { 1: 60 - 1:219}248 function "nf1b" { 1: 90 - 1:209}249 function "nf1c" { 1:1 20 - 1:199}250 eval { 1:1 - 1:56 } 251 function "" { 1:1 - 17:8 }246 function "" { 1:16 - 1:245 } 247 function "nf1a" { 1:77 - 1:236 } 248 function "nf1b" { 1:107 - 1:226 } 249 function "nf1c" { 1:137 - 1:216 } 250 eval { 1:1 - 1:56 } 251 function "" { 1:16 - 17:8 } 252 252 function "nf2a" { 4:21 - 15:5 } 253 253 function "nf2b" { 6:25 - 13:9 } 254 254 function "nf2c" { 8:29 - 11:13 } 255 255 eval { 1:1 - 1:56 } 256 function "" { 1:1 - 1:228}257 function "nf1a" { 1: 60 - 1:219}258 function "nf1b" { 1: 90 - 1:209}259 function "nf1c" { 1:1 20 - 1:199}260 eval { 1:1 - 1:56 } 261 function "" { 1:1 - 1:237}262 function "nfi1a" { 1: 61 - 1:227}263 function "nfi1b" { 1: 93 - 1:216}264 function "nfi1c" { 1:1 25 - 1:205}265 eval { 1:1 - 1:56 } 266 function "" { 1:1 - 17:8 }256 function "" { 1:16 - 1:245 } 257 function "nf1a" { 1:77 - 1:236 } 258 function "nf1b" { 1:107 - 1:226 } 259 function "nf1c" { 1:137 - 1:216 } 260 eval { 1:1 - 1:56 } 261 function "" { 1:16 - 1:254 } 262 function "nfi1a" { 1:78 - 1:244 } 263 function "nfi1b" { 1:110 - 1:233 } 264 function "nfi1c" { 1:142 - 1:222 } 265 eval { 1:1 - 1:56 } 266 function "" { 1:16 - 17:8 } 267 267 function "nf2a" { 4:21 - 15:5 } 268 268 function "nf2b" { 6:25 - 13:9 } 269 269 function "nf2c" { 8:29 - 11:13 } 270 270 eval { 1:1 - 1:56 } 271 function "" { 1:1 - 17:9 }271 function "" { 1:16 - 17:9 } 272 272 function "nfi2a" { 4:22 - 15:5 } 273 273 function "nfi2b" { 6:26 - 13:9 } -
trunk/Source/JavaScriptCore/ChangeLog
r181670 r181673 1 2015-03-17 Geoffrey Garen <ggaren@apple.com> 2 3 Function bodies should always include braces 4 https://bugs.webkit.org/show_bug.cgi?id=142795 5 6 Reviewed by Michael Saboff. 7 8 Having a mode for excluding the opening and closing braces from a function 9 body was unnecessary and confusing. 10 11 * bytecode/CodeBlock.cpp: 12 (JSC::CodeBlock::CodeBlock): Adopt the new one true linking function. 13 14 * bytecode/UnlinkedCodeBlock.cpp: 15 (JSC::generateFunctionCodeBlock): 16 (JSC::UnlinkedFunctionExecutable::link): 17 (JSC::UnlinkedFunctionExecutable::codeBlockFor): No need to pass through 18 a boolean: there is only one kind of function now. 19 20 (JSC::UnlinkedFunctionExecutable::linkInsideExecutable): Deleted. 21 (JSC::UnlinkedFunctionExecutable::linkGlobalCode): Deleted. Let's only 22 have one way to do things. This removes the old mode that would pretend 23 that a function always started at column 1. That pretense was not true: 24 an attribute event listener does not necessarily start at column 1. 25 26 * bytecode/UnlinkedCodeBlock.h: 27 * generate-js-builtins: Adopt the new one true linking function. 28 29 * parser/Parser.h: 30 (JSC::Parser<LexerType>::parse): 31 (JSC::parse): needsReparsingAdjustment is always true now, so I removed it. 32 33 * runtime/Executable.cpp: 34 (JSC::ScriptExecutable::newCodeBlockFor): 35 (JSC::FunctionExecutable::FunctionExecutable): 36 (JSC::ProgramExecutable::initializeGlobalProperties): 37 (JSC::FunctionExecutable::fromGlobalCode): 38 * runtime/Executable.h: 39 (JSC::FunctionExecutable::create): 40 (JSC::FunctionExecutable::bodyIncludesBraces): Deleted. Removed unused stuff. 41 42 * runtime/FunctionConstructor.cpp: 43 (JSC::constructFunctionSkippingEvalEnabledCheck): Always provide a 44 leading space because that's what this function's comment says is required 45 for web compatibility. We used to fake this up after the fact when 46 stringifying, based on the bodyIncludesBraces flag, but that flag is gone now. 47 48 * runtime/FunctionPrototype.cpp: 49 (JSC::insertSemicolonIfNeeded): 50 (JSC::functionProtoFuncToString): No need to add braces and/or a space 51 after the fact -- we always have them now. 52 1 53 2015-03-17 Mark Lam <mark.lam@apple.com> 2 54 -
trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp
r181664 r181673 73 73 JSParserStrictMode::NotStrict, 74 74 JSParserCodeType::Program, 75 error, &positionBeforeLastNewline, false,constructorKind);75 error, &positionBeforeLastNewline, constructorKind); 76 76 77 77 if (!program) { -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r181481 r181673 1754 1754 if (vm()->typeProfiler() || vm()->controlFlowProfiler()) 1755 1755 vm()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset()); 1756 m_functionDecls[i].set(*m_vm, ownerExecutable, unlinkedExecutable->link InsideExecutable(*m_vm, ownerExecutable->source()));1756 m_functionDecls[i].set(*m_vm, ownerExecutable, unlinkedExecutable->link(*m_vm, ownerExecutable->source())); 1757 1757 } 1758 1758 … … 1762 1762 if (vm()->typeProfiler() || vm()->controlFlowProfiler()) 1763 1763 vm()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset()); 1764 m_functionExprs[i].set(*m_vm, ownerExecutable, unlinkedExecutable->link InsideExecutable(*m_vm, ownerExecutable->source()));1764 m_functionExprs[i].set(*m_vm, ownerExecutable, unlinkedExecutable->link(*m_vm, ownerExecutable->source())); 1765 1765 } 1766 1766 -
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
r181664 r181673 53 53 VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, 54 54 CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, 55 UnlinkedFunctionKind functionKind, bool bodyIncludesBraces,ParserError& error)55 UnlinkedFunctionKind functionKind, ParserError& error) 56 56 { 57 57 JSParserBuiltinMode builtinMode = executable->isBuiltinFunction() ? JSParserBuiltinMode::Builtin : JSParserBuiltinMode::NotBuiltin; … … 59 59 std::unique_ptr<FunctionNode> function = parse<FunctionNode>( 60 60 &vm, source, executable->parameters(), executable->name(), builtinMode, 61 strictMode, JSParserCodeType::Function, error, 0 , bodyIncludesBraces);61 strictMode, JSParserCodeType::Function, error, 0); 62 62 63 63 if (!function) { … … 130 130 } 131 131 132 FunctionExecutable* UnlinkedFunctionExecutable::link InsideExecutable(VM& vm, const SourceCode& ownerSource)132 FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& ownerSource) 133 133 { 134 134 SourceCode source = m_sourceOverride ? SourceCode(m_sourceOverride) : ownerSource; … … 136 136 unsigned startOffset = source.startOffset() + m_startOffset; 137 137 138 // Adjust to one-based indexing. 138 139 bool startColumnIsOnFirstSourceLine = !m_firstLineOffset; 139 140 unsigned startColumn = m_unlinkedBodyStartColumn + (startColumnIsOnFirstSourceLine ? source.startColumn() : 1); … … 145 146 } 146 147 147 FunctionExecutable* UnlinkedFunctionExecutable::linkGlobalCode(VM& vm, const SourceCode& source)148 {149 ASSERT(!m_sourceOverride);150 unsigned firstLine = source.firstLine() + m_firstLineOffset;151 unsigned startOffset = source.startOffset() + m_startOffset;152 153 // We don't have any owner executable. The source string is effectively like a global154 // string (like in the handling of eval). Hence, the startColumn is always 1.155 unsigned startColumn = 1;156 bool endColumnIsOnStartLine = !m_lineCount;157 // The unlinkedBodyEndColumn is 0-based. Hence, we need to add 1 to it. But if the158 // endColumn is on the startLine, then we need to subtract back the adjustment for159 // the open brace resulting in an adjustment of 0.160 unsigned endColumnExcludingBraces = m_unlinkedBodyEndColumn + (endColumnIsOnStartLine ? 0 : 1);161 unsigned startOffsetExcludingOpenBrace = startOffset + 1;162 unsigned endOffsetExcludingCloseBrace = startOffset + m_sourceLength - 1;163 SourceCode code(source.provider(), startOffsetExcludingOpenBrace, endOffsetExcludingCloseBrace, firstLine, startColumn);164 165 return FunctionExecutable::create(vm, code, this, firstLine, firstLine + m_lineCount, startColumn, endColumnExcludingBraces, false);166 }167 168 148 UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(const Identifier& name, ExecState& exec, const SourceCode& source, JSObject*& exception) 169 149 { … … 187 167 UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor( 188 168 VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind, 189 DebuggerMode debuggerMode, ProfilerMode profilerMode, bool bodyIncludesBraces, 190 ParserError& error) 169 DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error) 191 170 { 192 171 switch (specializationKind) { … … 204 183 vm, this, source, specializationKind, debuggerMode, profilerMode, 205 184 isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, 206 bodyIncludesBraces,error);185 error); 207 186 208 187 if (error.isValid()) -
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
r181664 r181673 136 136 UnlinkedFunctionCodeBlock* codeBlockFor( 137 137 VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode, 138 bool bodyIncludesBraces,ParserError&);138 ParserError&); 139 139 140 140 static UnlinkedFunctionExecutable* fromGlobalCode(const Identifier&, ExecState&, const SourceCode&, JSObject*& exception); 141 141 142 FunctionExecutable* linkInsideExecutable(VM&, const SourceCode&); 143 FunctionExecutable* linkGlobalCode(VM&, const SourceCode&); 142 FunctionExecutable* link(VM&, const SourceCode&); 144 143 145 144 void clearCodeForRecompilation() -
trunk/Source/JavaScriptCore/generate-js-builtins
r181213 r181673 268 268 FunctionExecutable* codeName##Generator(VM& vm) \\ 269 269 { \\ 270 return vm.builtinExecutables()->codeName##Executable()->link GlobalCode(vm, vm.builtinExecutables()->codeName##Source()); \\270 return vm.builtinExecutables()->codeName##Executable()->link(vm, vm.builtinExecutables()->codeName##Source()); \\ 271 271 } 272 272 -
trunk/Source/JavaScriptCore/parser/Parser.h
r181664 r181673 434 434 435 435 template <class ParsedNode> 436 std::unique_ptr<ParsedNode> parse(ParserError& , bool needReparsingAdjustment);436 std::unique_ptr<ParsedNode> parse(ParserError&); 437 437 438 438 JSTextPosition positionBeforeLastNewline() const { return m_lexer->positionBeforeLastNewline(); } … … 905 905 template <typename LexerType> 906 906 template <class ParsedNode> 907 std::unique_ptr<ParsedNode> Parser<LexerType>::parse(ParserError& error , bool needReparsingAdjustment)907 std::unique_ptr<ParsedNode> Parser<LexerType>::parse(ParserError& error) 908 908 { 909 909 int errLine; 910 910 String errMsg; 911 911 912 if (ParsedNode::scopeIsFunction && needReparsingAdjustment)912 if (ParsedNode::scopeIsFunction) 913 913 m_lexer->setIsReparsing(); 914 914 … … 988 988 const Identifier& name, JSParserBuiltinMode builtinMode, 989 989 JSParserStrictMode strictMode, JSParserCodeType codeType, 990 ParserError& error, JSTextPosition* positionBeforeLastNewline = 0, 991 bool needReparsingAdjustment = false, 990 ParserError& error, JSTextPosition* positionBeforeLastNewline = 0, 992 991 ConstructorKind defaultConstructorKind = ConstructorKind::None) 993 992 { … … 997 996 if (source.provider()->source().is8Bit()) { 998 997 Parser<Lexer<LChar>> parser(vm, source, parameters, name, builtinMode, strictMode, codeType, defaultConstructorKind); 999 std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error , needReparsingAdjustment);998 std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error); 1000 999 if (positionBeforeLastNewline) 1001 1000 *positionBeforeLastNewline = parser.positionBeforeLastNewline(); … … 1009 1008 } 1010 1009 Parser<Lexer<UChar>> parser(vm, source, parameters, name, builtinMode, strictMode, codeType); 1011 std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error , needReparsingAdjustment);1010 std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error); 1012 1011 if (positionBeforeLastNewline) 1013 1012 *positionBeforeLastNewline = parser.positionBeforeLastNewline(); -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r181664 r181673 238 238 UnlinkedFunctionCodeBlock* unlinkedCodeBlock = 239 239 executable->m_unlinkedExecutable->codeBlockFor( 240 *vm, executable->m_source, kind, debuggerMode, profilerMode, e xecutable->bodyIncludesBraces(), error);240 *vm, executable->m_source, kind, debuggerMode, profilerMode, error); 241 241 recordParse(executable->m_unlinkedExecutable->features(), executable->m_unlinkedExecutable->hasCapturedVariables(), lineNo(), lastLine(), startColumn(), endColumn()); 242 242 if (!unlinkedCodeBlock) { … … 397 397 FunctionExecutable::FunctionExecutable(VM& vm, const SourceCode& source, 398 398 UnlinkedFunctionExecutable* unlinkedExecutable, unsigned firstLine, 399 unsigned lastLine, unsigned startColumn, unsigned endColumn, 400 bool bodyIncludesBraces) 399 unsigned lastLine, unsigned startColumn, unsigned endColumn) 401 400 : ScriptExecutable(vm.functionExecutableStructure.get(), vm, source, unlinkedExecutable->isInStrictContext()) 402 401 , m_unlinkedExecutable(vm, this, unlinkedExecutable) 403 , m_bodyIncludesBraces(bodyIncludesBraces)404 402 { 405 403 RELEASE_ASSERT(!source.isNull()); … … 509 507 for (size_t i = 0; i < functionDeclarations.size(); ++i) { 510 508 UnlinkedFunctionExecutable* unlinkedFunctionExecutable = functionDeclarations[i].second.get(); 511 JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable->link InsideExecutable(vm, m_source), scope);509 JSValue value = JSFunction::create(vm, unlinkedFunctionExecutable->link(vm, m_source), scope); 512 510 globalObject->addFunction(callFrame, functionDeclarations[i].first, value); 513 511 if (vm.typeProfiler() || vm.controlFlowProfiler()) { … … 615 613 if (!unlinkedExecutable) 616 614 return nullptr; 617 return unlinkedExecutable->link GlobalCode(exec.vm(), source);615 return unlinkedExecutable->link(exec.vm(), source); 618 616 } 619 617 -
trunk/Source/JavaScriptCore/runtime/Executable.h
r181664 r181673 544 544 static FunctionExecutable* create( 545 545 VM& vm, const SourceCode& source, UnlinkedFunctionExecutable* unlinkedExecutable, 546 unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn, 547 bool bodyIncludesBraces = true) 548 { 549 FunctionExecutable* executable = new (NotNull, allocateCell<FunctionExecutable>(vm.heap)) FunctionExecutable(vm, source, unlinkedExecutable, firstLine, lastLine, startColumn, endColumn, bodyIncludesBraces); 546 unsigned firstLine, unsigned lastLine, unsigned startColumn, unsigned endColumn) 547 { 548 FunctionExecutable* executable = new (NotNull, allocateCell<FunctionExecutable>(vm.heap)) FunctionExecutable(vm, source, unlinkedExecutable, firstLine, lastLine, startColumn, endColumn); 550 549 executable->finishCreation(vm); 551 550 return executable; … … 644 643 void clearCode(); 645 644 646 bool bodyIncludesBraces() const { return m_bodyIncludesBraces; }647 648 645 private: 649 646 FunctionExecutable( 650 647 VM&, const SourceCode&, UnlinkedFunctionExecutable*, unsigned firstLine, 651 unsigned lastLine, unsigned startColumn, unsigned endColumn, 652 bool bodyIncludesBraces); 648 unsigned lastLine, unsigned startColumn, unsigned endColumn); 653 649 654 650 bool isCompiling() … … 668 664 RefPtr<FunctionCodeBlock> m_codeBlockForCall; 669 665 RefPtr<FunctionCodeBlock> m_codeBlockForConstruct; 670 bool m_bodyIncludesBraces;671 666 RefPtr<TypeSet> m_returnStatementTypeSet; 672 667 }; -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp
r181208 r181673 94 94 String program; 95 95 if (args.isEmpty()) 96 program = ASCIILiteral("(function() { \n})");96 program = ASCIILiteral("(function() { \n})"); 97 97 else if (args.size() == 1) 98 program = makeString("(function() { ", args.at(0).toString(exec)->value(exec), "\n})");98 program = makeString("(function() { ", args.at(0).toString(exec)->value(exec), "\n})"); 99 99 else { 100 100 StringBuilder builder; … … 105 105 builder.append(args.at(i).toString(exec)->value(exec)); 106 106 } 107 builder.appendLiteral(") { ");107 builder.appendLiteral(") { "); 108 108 builder.append(args.at(args.size() - 1).toString(exec)->value(exec)); 109 109 builder.appendLiteral("\n})"); -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r173120 r181673 83 83 84 84 // Compatibility hack for the Optimost JavaScript library. (See <rdar://problem/6595040>.) 85 static inline void insertSemicolonIfNeeded(String& functionBody , bool bodyIncludesBraces)85 static inline void insertSemicolonIfNeeded(String& functionBody) 86 86 { 87 if (!bodyIncludesBraces)88 functionBody = makeString("{ ", functionBody, '}');89 90 87 ASSERT(functionBody[0] == '{'); 91 88 ASSERT(functionBody[functionBody.length() - 1] == '}'); … … 110 107 FunctionExecutable* executable = function->jsExecutable(); 111 108 String sourceString = executable->source().toString(); 112 insertSemicolonIfNeeded(sourceString , executable->bodyIncludesBraces());109 insertSemicolonIfNeeded(sourceString); 113 110 return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "(", executable->paramString(), ") ", sourceString)); 114 111 }
Note:
See TracChangeset
for help on using the changeset viewer.