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

BUG=132727
TEST=none

Review URL: https://chromiumcodereview.appspot.com/10543160

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
loislo@chromium.org 2012-06-14 12:21:05 +00:00
parent fb81da2e5f
commit 1a86ed8c30

View File

@ -2692,6 +2692,10 @@ void V8HeapExplorer::TagGlobalObjects() {
Object* obj_document;
if (global_obj->GetProperty(*document_string)->ToObject(&obj_document) &&
obj_document->IsJSObject()) {
// FixMe: Workaround: SharedWorker's current Isolate 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) &&