OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include <windows.h> | 44 #include <windows.h> |
45 #include <winnt.h> | 45 #include <winnt.h> |
46 #elif defined(__GLIBC__) | 46 #elif defined(__GLIBC__) |
47 extern "C" void* __libc_stack_end; // NOLINT | 47 extern "C" void* __libc_stack_end; // NOLINT |
48 #endif | 48 #endif |
49 | 49 |
50 #if defined(MEMORY_SANITIZER) | 50 #if defined(MEMORY_SANITIZER) |
51 #include <sanitizer/msan_interface.h> | 51 #include <sanitizer/msan_interface.h> |
52 #endif | 52 #endif |
53 | 53 |
54 namespace WebCore { | 54 namespace blink { |
55 | 55 |
56 static void* getStackStart() | 56 static void* getStackStart() |
57 { | 57 { |
58 #if defined(__GLIBC__) || OS(ANDROID) | 58 #if defined(__GLIBC__) || OS(ANDROID) |
59 pthread_attr_t attr; | 59 pthread_attr_t attr; |
60 if (!pthread_getattr_np(pthread_self(), &attr)) { | 60 if (!pthread_getattr_np(pthread_self(), &attr)) { |
61 void* base; | 61 void* base; |
62 size_t size; | 62 size_t size; |
63 int error = pthread_attr_getstack(&attr, &base, &size); | 63 int error = pthread_attr_getstack(&attr, &base, &size); |
64 RELEASE_ASSERT(!error); | 64 RELEASE_ASSERT(!error); |
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 threadAttachMutex().unlock(); | 970 threadAttachMutex().unlock(); |
971 return gcInfo; | 971 return gcInfo; |
972 } | 972 } |
973 } | 973 } |
974 if (needLockForIteration) | 974 if (needLockForIteration) |
975 threadAttachMutex().unlock(); | 975 threadAttachMutex().unlock(); |
976 return 0; | 976 return 0; |
977 } | 977 } |
978 #endif | 978 #endif |
979 } | 979 } |
OLD | NEW |