| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index e6ddc0cdfa04d92b4e7d7a4a630d2eaa05cbc992..b80dfe4bb8720ea9ff4e71e4785d2c5c32bb9f66 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -12773,7 +12773,11 @@ MaybeHandle<SharedFunctionInfo> Script::FindSharedFunctionInfo(
|
| SharedFunctionInfo* shared;
|
| while ((shared = iterator.Next<SharedFunctionInfo>())) {
|
| if (fun->function_token_position() == shared->function_token_position() &&
|
| - fun->start_position() == shared->start_position()) {
|
| + fun->start_position() == shared->start_position() &&
|
| + fun->end_position() == shared->end_position()) {
|
| + // This method is not used to find top-level SharedFunctionInfo objects,
|
| + // verify that above checks are sufficient to distinguish top-level code.
|
| + DCHECK(!shared->is_toplevel());
|
| return Handle<SharedFunctionInfo>(shared);
|
| }
|
| }
|
|
|