Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index ee31a367cd6590f70c5b05bec9b9fcdecd218fba..89d8c75ca0e02dec4e4ede8079ffa150ba079d6a 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -13301,8 +13301,7 @@ Handle<String> JSFunction::ToString(Handle<JSFunction> function) { |
Handle<SharedFunctionInfo> shared_info(function->shared(), isolate); |
// Check if {function} should hide its source code. |
- if (!shared_info->script()->IsScript() || |
- Script::cast(shared_info->script())->hide_source()) { |
+ if (!shared_info->IsUserJavaScript()) { |
return NativeCodeFunctionSourceString(shared_info); |
} |