MCPcopy Index your code
hub / github.com/nodejs/node / processScriptEvent

Method processScriptEvent

deps/v8/tools/parse-processor.mjs:926–961  ·  view source on GitHub ↗
(eventName, scriptId, timestamp)

Source from the content-addressed store, hash-verified

924 }
925
926 processScriptEvent(eventName, scriptId, timestamp) {
927 let script = this.idToScript.get(scriptId);
928 switch (eventName) {
929 case 'create':
930 case 'reserve-id':
931 case 'deserialize': {
932 if (script !== undefined) return;
933 script = new Script(scriptId);
934 this.idToScript.set(scriptId, script);
935 if (eventName == 'deserialize') {
936 script.deserializationTimestamp = toTimestamp(timestamp);
937 }
938 return;
939 }
940 case 'background-compile':
941 if (script.isBackgroundCompiled) {
942 throw 'Cannot background-compile twice';
943 }
944 script.isBackgroundCompiled = true;
945 // TODO(cbruni): remove once backwards compatibility is no longer needed.
946 script.isStreamingCompiled = true;
947 // TODO(cbruni): fix parse events for background compilation scripts
948 script.preparseTimestamp = toTimestamp(timestamp);
949 return;
950 case 'streaming-compile':
951 if (script.isStreamingCompiled) throw 'Cannot stream-compile twice';
952 // TODO(cbruni): remove once backwards compatibility is no longer needed.
953 script.isBackgroundCompiled = true;
954 script.isStreamingCompiled = true;
955 // TODO(cbruni): fix parse events for background compilation scripts
956 script.preparseTimestamp = toTimestamp(timestamp);
957 return;
958 default:
959 console.error(`Unhandled script event: ${eventName}`);
960 }
961 }
962
963 processScriptDetails(scriptId, file, startLine, startColumn, size) {
964 let script = this.lookupScript(scriptId);

Callers

nothing calls this directly

Calls 4

toTimestampFunction · 0.85
getMethod · 0.65
setMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected