OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 Node* V8GCController::opaqueRootForGC(Node* node, v8::Isolate*) | 71 Node* V8GCController::opaqueRootForGC(Node* node, v8::Isolate*) |
72 { | 72 { |
73 // FIXME: Remove the special handling for image elements. | 73 // FIXME: Remove the special handling for image elements. |
74 // The same special handling is in V8GCController::gcTree(). | 74 // The same special handling is in V8GCController::gcTree(). |
75 // Maybe should image elements be active DOM nodes? | 75 // Maybe should image elements be active DOM nodes? |
76 // See https://code.google.com/p/chromium/issues/detail?id=164882 | 76 // See https://code.google.com/p/chromium/issues/detail?id=164882 |
77 if (node->inDocument() || (node->hasTagName(HTMLNames::imgTag) && toHTMLImag
eElement(node)->hasPendingActivity())) | 77 if (node->inDocument() || (node->hasTagName(HTMLNames::imgTag) && toHTMLImag
eElement(node)->hasPendingActivity())) |
78 return node->document(); | 78 return &node->document(); |
79 | 79 |
80 if (node->isAttributeNode()) { | 80 if (node->isAttributeNode()) { |
81 Node* ownerElement = toAttr(node)->ownerElement(); | 81 Node* ownerElement = toAttr(node)->ownerElement(); |
82 if (!ownerElement) | 82 if (!ownerElement) |
83 return node; | 83 return node; |
84 node = ownerElement; | 84 node = ownerElement; |
85 } | 85 } |
86 | 86 |
87 while (Node* parent = node->parentOrShadowHostNode()) | 87 while (Node* parent = node->parentOrShadowHostNode()) |
88 node = parent; | 88 node = parent; |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 { | 414 { |
415 v8::HandleScope handleScope(isolate); | 415 v8::HandleScope handleScope(isolate); |
416 v8::Local<v8::Context> context = v8::Context::New(isolate); | 416 v8::Local<v8::Context> context = v8::Context::New(isolate); |
417 if (context.IsEmpty()) | 417 if (context.IsEmpty()) |
418 return; | 418 return; |
419 v8::Context::Scope contextScope(context); | 419 v8::Context::Scope contextScope(context); |
420 V8ScriptRunner::compileAndRunInternalScript(v8String("if (gc) gc();", isolat
e), isolate); | 420 V8ScriptRunner::compileAndRunInternalScript(v8String("if (gc) gc();", isolat
e), isolate); |
421 } | 421 } |
422 | 422 |
423 } // namespace WebCore | 423 } // namespace WebCore |
OLD | NEW |