Index: src/serialize.cc |
diff --git a/src/serialize.cc b/src/serialize.cc |
index ee0a9ec6a6abbed726b1f935bc41662b1366406f..95d528081fe65be4777f8aa64239298e2b5f86e2 100644 |
--- a/src/serialize.cc |
+++ b/src/serialize.cc |
@@ -2244,6 +2244,18 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize( |
} |
Handle<SharedFunctionInfo> result(SharedFunctionInfo::cast(root), isolate); |
result->set_deserialized(true); |
+ |
+ if (isolate->logger()->is_logging_code_events() || |
+ isolate->cpu_profiler()->is_profiling()) { |
+ String* name = isolate->heap()->empty_string(); |
+ if (result->script()->IsScript()) { |
+ Script* script = Script::cast(result->script()); |
+ if (script->name()->IsString()) name = String::cast(script->name()); |
+ } |
+ isolate->logger()->CodeCreateEvent(Logger::SCRIPT_TAG, result->code(), |
+ *result, NULL, name); |
+ } |
+ |
return result; |
} |