Hi, 

I am trying to find every *undefined* property lookup in my codebase for 
code analysis. I thought it would be most straightforward to add a few 
lines in the get object property part in Node.js(v8). After a day of hard 
work, I finally make a progress: I added the following code to the 
`Runtime::GetObjectProperty` function in 
`./deps/v8/src/runtime/runtime-object.cc`.

```cpp
if(result.ToHandleChecked()->IsUndefined(isolate)){
    printf("[!] Found undefined property: ");
    lookup_key.GetName()->NameShortPrint();
    printf("\n");
  }
```

However, it doesn't print the stuff I want. When I try it with a simple 
case, it outputs something shown below:

```js
a = {
    "nohello": 1
}
console.log(a.hello);
```

Output by the revised Node.js
```console
[!] Found undefined property: <kHandle>
[!] Found undefined property: <kHandle>
[!] Found undefined property: <kHandle>
[!] Found undefined property: /home/x/tmp/test.js 
[!] Found undefined property: MODULE
[!] Found undefined property: /home/x/tmp/test.js
undefined
[!] Found undefined property: beforeExit
```

Expected output
```console
[!] Found undefined property: <a:hello>
```

Is there anyone who can help me to achieve this feature?
Happy Thanksgiving:>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/04d417e9-3167-4025-b8a3-ef7f5405789en%40googlegroups.com.

Reply via email to