| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 filename = "npscript"; | 329 filename = "npscript"; |
| 330 | 330 |
| 331 String script = String::fromUTF8(npScript->UTF8Characters, npScript->UTF8Len
gth); | 331 String script = String::fromUTF8(npScript->UTF8Characters, npScript->UTF8Len
gth); |
| 332 | 332 |
| 333 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingUs
erGesture : PossiblyProcessingUserGesture); | 333 UserGestureIndicator gestureIndicator(popupsAllowed ? DefinitelyProcessingUs
erGesture : PossiblyProcessingUserGesture); |
| 334 v8::Local<v8::Value> v8result = proxy->evaluate(ScriptSourceCode(script, KUR
L(ParsedURLString, filename)), 0); | 334 v8::Local<v8::Value> v8result = proxy->evaluate(ScriptSourceCode(script, KUR
L(ParsedURLString, filename)), 0); |
| 335 | 335 |
| 336 if (v8result.IsEmpty()) | 336 if (v8result.IsEmpty()) |
| 337 return false; | 337 return false; |
| 338 | 338 |
| 339 convertV8ObjectToNPVariant(v8result, npObject, result); | 339 if (_NPN_IsAlive(npObject)) |
| 340 convertV8ObjectToNPVariant(v8result, npObject, result); |
| 340 return true; | 341 return true; |
| 341 } | 342 } |
| 342 | 343 |
| 343 bool _NPN_GetProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName, NP
Variant* result) | 344 bool _NPN_GetProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName, NP
Variant* result) |
| 344 { | 345 { |
| 345 if (!npObject) | 346 if (!npObject) |
| 346 return false; | 347 return false; |
| 347 | 348 |
| 348 if (npObject->_class == npScriptObjectClass) { | 349 if (npObject->_class == npScriptObjectClass) { |
| 349 V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject); | 350 V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 | 585 |
| 585 convertV8ObjectToNPVariant(resultObject, npObject, result); | 586 convertV8ObjectToNPVariant(resultObject, npObject, result); |
| 586 return true; | 587 return true; |
| 587 } | 588 } |
| 588 | 589 |
| 589 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) | 590 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) |
| 590 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); | 591 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); |
| 591 | 592 |
| 592 return false; | 593 return false; |
| 593 } | 594 } |
| OLD | NEW |