OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 341 |
342 if (obj->onSetWindow) | 342 if (obj->onSetWindow) |
343 free(obj->onSetWindow); | 343 free(obj->onSetWindow); |
344 | 344 |
345 if (obj->onPaintEvent) | 345 if (obj->onPaintEvent) |
346 free(obj->onPaintEvent); | 346 free(obj->onPaintEvent); |
347 | 347 |
348 if (obj->evaluateScriptOnMouseDownOrKeyDown) | 348 if (obj->evaluateScriptOnMouseDownOrKeyDown) |
349 free(obj->evaluateScriptOnMouseDownOrKeyDown); | 349 free(obj->evaluateScriptOnMouseDownOrKeyDown); |
350 | 350 |
351 if (obj->logDestroy) | 351 if (obj->logDestroy) { |
352 pluginLog(instance, "NPP_Destroy"); | 352 // Note: this intentionally avoids using pluginLog(), because that |
| 353 // requires running JS during document detach, which is forbidden. |
| 354 puts("PLUGIN: NPP_Destroy"); |
| 355 } |
353 | 356 |
354 #ifdef XP_MACOSX | 357 #ifdef XP_MACOSX |
355 if (obj->coreAnimationLayer) | 358 if (obj->coreAnimationLayer) |
356 CFRelease(obj->coreAnimationLayer); | 359 CFRelease(obj->coreAnimationLayer); |
357 #endif | 360 #endif |
358 | 361 |
359 if (obj->pluginTest) | 362 if (obj->pluginTest) |
360 obj->pluginTest->NPP_Destroy(save); | 363 obj->pluginTest->NPP_Destroy(save); |
361 | 364 |
362 browser->releaseobject(&obj->header); | 365 browser->releaseobject(&obj->header); |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 { | 890 { |
888 return "application/x-webkit-test-netscape:testnetscape:test netscape conten
t;image/png:png:PNG image"; | 891 return "application/x-webkit-test-netscape:testnetscape:test netscape conten
t;image/png:png:PNG image"; |
889 } | 892 } |
890 | 893 |
891 extern "C" | 894 extern "C" |
892 NPError NP_GetValue(NPP instance, NPPVariable variable, void* value) | 895 NPError NP_GetValue(NPP instance, NPPVariable variable, void* value) |
893 { | 896 { |
894 return NPP_GetValue(instance, variable, value); | 897 return NPP_GetValue(instance, variable, value); |
895 } | 898 } |
896 #endif | 899 #endif |
OLD | NEW |