Reviewers: mnaganov, yurys, alexeif,

Description:
Workarround for: Chrome dev tools crashes when taking a heap snapshot of Docs
offline shared worker.

BUG=132727
TEST=none


Please review this at https://chromiumcodereview.appspot.com/10543160/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/profile-generator.cc


Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index ca19f4aaaffea68b8a12e0764086bfa09ec5e06a..dde33b870122e994b6d3863289ee43de657ba5e3 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -2692,6 +2692,10 @@ void V8HeapExplorer::TagGlobalObjects() {
     Object* obj_document;
if (global_obj->GetProperty(*document_string)->ToObject(&obj_document) &&
         obj_document->IsJSObject()) {
+      // FixMe: Workarround: SharedWorker has NULL context.
+      // As result GetProperty(*url_string) will crash.
+ if (!Isolate::Current()->context() && obj_document->IsJSGlobalProxy())
+        continue;
       JSObject* document = JSObject::cast(obj_document);
       Object* obj_url;
       if (document->GetProperty(*url_string)->ToObject(&obj_url) &&


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to