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