Changeset 29810 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Jan 26, 2008, 10:55:52 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r29428 r29810 1014 1014 KJS_CHECKEXCEPTIONVALUE 1015 1015 1016 JSObject *thisObj = base;1016 JSObject* thisObj = base; 1017 1017 // ECMA 11.2.3 says that in this situation the this value should be null. 1018 1018 // However, section 10.2.3 says that in the case where the value provided 1019 1019 // by the caller is null, the global object should be used. It also says 1020 // that the section does not apply to inter al functions, but for simplicity1020 // that the section does not apply to internal functions, but for simplicity 1021 1021 // of implementation we use the global object anyway here. This guarantees 1022 1022 // that in host objects you always get a valid object for this. … … 3954 3954 if (ident.isEmpty() && !exec->inIteration()) 3955 3955 return setErrorCompletion(exec, SyntaxError, "Invalid continue statement."); 3956 if (!ident.isEmpty() && !exec->seenLabels() ->contains(ident))3956 if (!ident.isEmpty() && !exec->seenLabels().contains(ident)) 3957 3957 return setErrorCompletion(exec, SyntaxError, "Label %s not found.", ident); 3958 3958 return exec->setContinueCompletion(&ident); … … 3966 3966 if (ident.isEmpty() && !exec->inIteration() && !exec->inSwitch()) 3967 3967 return setErrorCompletion(exec, SyntaxError, "Invalid break statement."); 3968 if (!ident.isEmpty() && !exec->seenLabels() ->contains(ident))3968 if (!ident.isEmpty() && !exec->seenLabels().contains(ident)) 3969 3969 return setErrorCompletion(exec, SyntaxError, "Label %s not found."); 3970 3970 return exec->setBreakCompletion(&ident); … … 4161 4161 JSValue* LabelNode::execute(ExecState *exec) 4162 4162 { 4163 if (!exec->seenLabels() ->push(label))4163 if (!exec->seenLabels().push(label)) 4164 4164 return setErrorCompletion(exec, SyntaxError, "Duplicated label %s found.", label); 4165 4165 JSValue* result = statement->execute(exec); 4166 exec->seenLabels() ->pop();4166 exec->seenLabels().pop(); 4167 4167 4168 4168 if (exec->completionType() == Break && exec->breakOrContinueTarget() == label)
Note:
See TracChangeset
for help on using the changeset viewer.