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-2009 Google, Inc. All rights reserved. | 3 * Copyright (C) 2007-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 20 matching lines...) Expand all Loading... |
31 #include "bindings/core/v8/npruntime_impl.h" | 31 #include "bindings/core/v8/npruntime_impl.h" |
32 #include "bindings/core/v8/npruntime_priv.h" | 32 #include "bindings/core/v8/npruntime_priv.h" |
33 | 33 |
34 #include "wtf/Assertions.h" | 34 #include "wtf/Assertions.h" |
35 #include "wtf/HashMap.h" | 35 #include "wtf/HashMap.h" |
36 #include "wtf/HashSet.h" | 36 #include "wtf/HashSet.h" |
37 #include "wtf/HashTableDeletedValueType.h" | 37 #include "wtf/HashTableDeletedValueType.h" |
38 | 38 |
39 #include <stdlib.h> | 39 #include <stdlib.h> |
40 | 40 |
41 using namespace WebCore; | 41 using namespace blink; |
42 | 42 |
43 // FIXME: Consider removing locks if we're singlethreaded already. | 43 // FIXME: Consider removing locks if we're singlethreaded already. |
44 // The static initializer here should work okay, but we want to avoid | 44 // The static initializer here should work okay, but we want to avoid |
45 // static initialization in general. | 45 // static initialization in general. |
46 | 46 |
47 namespace npruntime { | 47 namespace npruntime { |
48 | 48 |
49 // We use StringKey here as the key-type to avoid a string copy to | 49 // We use StringKey here as the key-type to avoid a string copy to |
50 // construct the map key and for faster comparisons than strcmp. | 50 // construct the map key and for faster comparisons than strcmp. |
51 class StringKey { | 51 class StringKey { |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 liveObjectMap().remove(npObject); | 456 liveObjectMap().remove(npObject); |
457 forgetV8ObjectForNPObject(npObject); | 457 forgetV8ObjectForNPObject(npObject); |
458 } | 458 } |
459 | 459 |
460 bool _NPN_IsAlive(NPObject* npObject) | 460 bool _NPN_IsAlive(NPObject* npObject) |
461 { | 461 { |
462 return liveObjectMap().find(npObject) != liveObjectMap().end(); | 462 return liveObjectMap().find(npObject) != liveObjectMap().end(); |
463 } | 463 } |
464 | 464 |
465 } // extern "C" | 465 } // extern "C" |
OLD | NEW |