Chromium Code Reviews| Index: src/ast/scopes.cc |
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
| index 1eda493d6e5d7880e709824e659c4958319a2cca..cf5dd29b66ed448d6c59891996749a08eed92eb2 100644 |
| --- a/src/ast/scopes.cc |
| +++ b/src/ast/scopes.cc |
| @@ -1154,7 +1154,13 @@ bool Scope::ResolveVariable(ParseInfo* info, VariableProxy* proxy, |
| // - Variables must not be allocated to the global scope. |
| CHECK_NOT_NULL(outer_scope()); |
| // - Variables must be bound locally or unallocated. |
| - CHECK_EQ(BOUND, binding_kind); |
| + if (BOUND != binding_kind) { |
| + // The following variable name may be minified. If so, disable |
| + // minification in js2c.py for better output. |
| + Handle<String> name = proxy->raw_name()->string(); |
| + V8_Fatal(__FILE__, __LINE__, "Unbound variable: '%s' in native script.", |
|
Yang
2015/12/08 14:38:15
nice.
|
| + name->ToCString().get()); |
| + } |
| VariableLocation location = var->location(); |
| CHECK(location == VariableLocation::LOCAL || |
| location == VariableLocation::CONTEXT || |